JAVA: basics

By: Aditi Dosi

Hello, World.

Editing, compiling, and executing:

Built-in data types:

Declaration and assignment statements:


Floating-point numbers:


Comparison operators:


Parsing command-line arguments:

Math library:

The full java.lang.Math API.

Anatomy of an if statement:

If and if-else statements:

Nested if-else statement:

Anatomy of a while loop:

Anatomy of a for loop:


Break statement:

Do-while loop:

Switch statement:


Inline array initialization-

Typical array-processing code-

Two-dimensional arrays:

Our stack data type:

Our queue data type:


Our symbol table data type.

Our set data type:

Our graph data type:

(wait for java series part 2…)

Thankyou :)



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store