0% found this document useful (0 votes)
23 views19 pages

Šalić

This document provides an overview of key concepts in computer programming including data types, variables, operators, control flow, functions, libraries, objects, and classes. It discusses built-in types like integers and booleans, comparison operators, conditionals, loops, arrays, functions, objects, classes, and standard libraries for input/output, drawing, audio, and random numbers.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views19 pages

Šalić

This document provides an overview of key concepts in computer programming including data types, variables, operators, control flow, functions, libraries, objects, and classes. It discusses built-in types like integers and booleans, comparison operators, conditionals, loops, arrays, functions, objects, classes, and standard libraries for input/output, drawing, audio, and random numbers.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Hello, World.

Editing, compiling, and executing.

Built-in data types.

Declaration and assignment statements.


Integers.

Floating-point numbers.

Booleans.
Comparison operators.

Parsing command-line arguments.

Math library.
The full Math API.

Type conversion.
If and if-else statements.

Nested if-else statement.

While and for loops.

     
Deeper nesting.
// print out Pythagorean triples (i, j, k) such that i^2 + j^2 = k^2
for (int i = 1; i <= N; i++) {
for (int j = i; j <= N; j++) {
for (int k = j; k <= N; k++) {
if (i*i + j*j == k*k) {
System.out.println("(" + i + ", " + j + ", " + k + ")");
}
}
}
}
-->

Break statement.

Do-while loop.
Switch statement.

Arrays.

Compile-time initialization.

Typical array-processing code.


Two-dimensional arrays.

Compile-time initialization.

Ragged arrays.
Our standard output library.

The full StdOut API.

Our standard input library.


The full StdIn API.

Our standard drawing library.

The full StdDraw API.

Our standard audio library.


The full StdAudio API.

Redirection and piping.

              

Functions.
Libraries of functions.
Our standard random library.

Our standard statistics library.


Using an object.

Creating an object.

Instance variables.

Constructors.
Instance methods.

Classes.
Object-oriented libraries.
Java's String data type.

The full String API.


Java's Color data type.

The full Color API.

Our input library.

The full In API.

Our output library.


The full Out API.

Our picture library.

The full Picture API.

You might also like