Skip to main content

Basic Programs

First programs, constructors, methods and simple class examples.

1

My First Java Example in Java

Learn My First in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
2

Constructor Example in Java

Learn Constructor in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
3

Parametrized Method Example in Java

Learn Parametrized Method in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
4

Static Class and Its Usage in Java

Learn Static Class and Its Usage in in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
5

Static Function or Method and Its Usage in Java

Learn Static Function or Method and Its Usage in in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
6

Default and Parameterized Constructor Example in Java

Learn Default and Parameterized Constructor in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
7

Constructor Chaining Example in Java

Learn Constructor Chaining in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
8

Singleton Class using Private Constructor Example in Java

Learn Singleton Class Using Private Constructor in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
9

Constructor Overloading Example in Java

Learn Constructor Overloading in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
10

Simple Class and Array of Object Example in Java

Learn Simple Class and Array of Object in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
11

Multiple Inheritance using Interface Example in Java

Learn Multiple Inheritance Using Interface in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
12

Single Inheritance Example in Java

Learn Single Inheritance in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
13

Multilevel Inheritance Example in Java

Learn Multilevel Inheritance in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
14

Hierarchical Inheritance Example in Java

Learn Hierarchical Inheritance in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
15

Create Matrix Example in Java

Learn Create Matrix in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
16

Sum of Three Numbers Example in Java

Learn Sum Of Three Numbers in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
17

Find All Substrings of a Given String Example in Java

Learn Find all Substrings of a given string in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
18

Heap Sort Example in Java

Learn Heap Sort in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
19

Twin Prime Example in Java

Learn Twin Prime in Java with explanation, complete source code, step-by-step walkthrough and sample output.

basic programs
20

Java Scanner Class Example in Java

Learn how to read user input in Java using the Scanner class with nextInt, nextLine and nextDouble, including a complete example and sample output.

input
21

JDK JRE JVM Explained Example in Java

Understand JDK, JRE and JVM roles in Java with a simple program showing compilation and execution flow, plus a clear comparison table.

jdk

Related Topics

Search tutorials