DEV Community

LohithS
LohithS

Posted on

Basic java tutorial and java programs

This article is purely for freshers/beginners in java programming. Here I have shared 200+ java tutorial and java programs basically on core java.

This core java tutorial have links to all basic java and java programs in systematic order for beginners/freshers. This article is for college student or student who want to learn java from scratch and I hope this would be definitely be useful for freshers/beginners.

Basics of java

History of java and overview.
Basics of Java Virtual Machine and Architecture.
Compile and run first java program.
Variables in java.
Operators in java.
If else in java.
switch statement in java.
for loop in java.
while loop in java.
do while loop in java.
continue statement in java.
break statement in java.

Object Oriented Programming concepts in java

static keyword in java.
constructor in java.
inheritance and types in java with examples.
super keyword in java.
classes and objects in java.
polymorphism in java.
encapsulation in java.
abstraction in java.
interface in java.
Multiple inheritance in java.
instanceof operator in java.
Access modifiers in java.
Garbage collection in java.
getter and setter in java.
catch multiple exceptions and rethrow exception in java.

Collections in java tutorial

ArrayList in java.
HashSet in java.
LinkedHashSet in java.
TreeSet in java.
TreeMap in java.
iterate TreeMap in java.
Sort TreeMap by value in java.
Comparable interface in java.
Functional interface in java.
TreeMap comparator() method in java with example.

Core java — Miscellaneous

Why String is immutable in java.
String charAt() method in java.
Strings in java.
String length() method in java.
Compare two strings in java.
String palindrome in java using stringbuffer.
String palindrome in java using array.
String indexOf(String str, int fromIndex) method in java.
String toLowerCase(Locale locale) method in java.
String toUpperCase() method in java.
Uppercase to lowercase in java without using string function.

Core java Input/Output

create new file in java.
rename file extension in java.
rename all files in a folder in java.
delete file in java.
rename file in java.
get file last modified date in java.
create directory in java.
delete directory in java recursively.

Basic java programs with output

Display fibonacci series in java.
Reverse factorial program in java.
Factorial from 1 to 10 in java.
Factorial program in java.
Java program to swap two numbers using bitwise operator.
Java program to swap two numbers using function.
Java program to swap two numbers.
Java program to find largest of three numbers.
Java program to find the largest in three numbers using nested if.
Java program to find largest in three numbers using ternary operator.
Leap year using conditional operator in java.
Java program to find if given year is leap year.
Reverse an array without using another array in java.
Reverse an array in java using for loop.
Reverse factorial program in java.
Java program to find area of circle and rectangle using interface.
Java program to calculate area of circle rectangle and triangle using switch statement.
Java program to find area of circle using bufferedreader.
Java program to calculate area of circle using method.
Java program to calculate area of a circle.
Java program to find area of triangle.
area of isosceles triangle in java.
area of equilateral triangle in java.
Java program to calculate sum of even and odd numbers in an array.
Java program to find sum & average of an array.
Java program to print prime numbers from 2 to n.
Prime number program in java using scanner.
Java program to print prime numbers upto n.
Java program to print prime numbers in a given range.
Java program to display prime numbers from 1 to 100.
Java program to check whether number is prime or not.
Even odd program in java using ternary operator.
Java program to calculate sum of even and odd numbers in an array.
Java program to print odd and even numbers between 1 and 100.
count number of even and odd elements in an array in java.
Java program to put even & odd elements of an array in 2 separate arrays.
Display even and odd numbers in java using for loop.
Java bitwise AND to check a given number is odd or even.
Java program to print odd and even numbers in an array.
Java program to check even or odd number.
Linear search in java using recursion.
Binary search program in java.
Generate random number in java.
Convert binary to decimal in java using recursion.
Convert binary to decimal in java.
java do while loop with user input.
Create matrix with user input in java.

Top comments (0)