Basic java tutorial and java programs
Tags: java, javaprograms, basicjavatutorial, javaprogramming
Published: 2021-08-17 10:55:52

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.](https://www.flowerbrackets.com/java-overview/)
[Basics of Java Virtual Machine and Architecture.](https://www.flowerbrackets.com/preface-to-java-virtual-machine-and-architecture/)
[Compile and run first java program.](https://www.flowerbrackets.com/how-to-compile-java-programs/)
[Variables in java.](https://www.flowerbrackets.com/variables-in-java/)
[Operators in java.](https://www.flowerbrackets.com/operators-in-java/)
[If else in java.](https://www.flowerbrackets.com/if-else-java/)
[switch statement in java.](https://www.flowerbrackets.com/switch-statement-in-java/)
[for loop in java.](https://www.flowerbrackets.com/for-loop-in-java/)
[while loop in java.](https://www.flowerbrackets.com/while-loop-in-java/)
[do while loop in java.](https://www.flowerbrackets.com/do-while-loop-java/)
[continue statement in java.](https://www.flowerbrackets.com/continue-statement-java/)
[break statement in java.](https://www.flowerbrackets.com/break-statement-in-java/)

**Object Oriented Programming concepts in java**

[static keyword in java.](https://www.flowerbrackets.com/static-keyword-in-java/)
[constructor in java.](https://www.flowerbrackets.com/constructor-in-java/)
[inheritance and types in java with examples.](https://www.flowerbrackets.com/inheritance-in-java/)
[super keyword in java.](https://www.flowerbrackets.com/super-keyword-in-java/)
[classes and objects in java.](https://www.flowerbrackets.com/classes-and-objects-in-java/)
[polymorphism in java.](https://www.flowerbrackets.com/polymorphism-in-java/)
[encapsulation in java.](https://www.flowerbrackets.com/encapsulation-in-java-programs/)
[abstraction in java.](https://www.flowerbrackets.com/abstraction-in-java/)
[interface in java.](https://www.flowerbrackets.com/interface-in-java/)
[Multiple inheritance in java.](https://www.flowerbrackets.com/multiple-inheritance-in-java/)
[instanceof operator in java.](https://www.flowerbrackets.com/instanceof-java/)
[Access modifiers in java.](https://www.flowerbrackets.com/access-modifiers-in-java/)
[Garbage collection in java.](https://www.flowerbrackets.com/garbage-collection-in-java/)
[getter and setter in java.](https://www.flowerbrackets.com/getter-and-setter-in-java/)
[catch multiple exceptions and rethrow exception in java.](https://www.flowerbrackets.com/java-catch-multiple-exceptions-rethrow-exception/)

**Collections in java tutorial**

[ArrayList in java.](https://www.flowerbrackets.com/arraylist-in-java/)
[HashSet in java.](https://www.flowerbrackets.com/hashset-in-java/)
[LinkedHashSet in java.](https://www.flowerbrackets.com/linkedhashset-in-java/)
[TreeSet in java.](https://www.flowerbrackets.com/treeset-in-java/)
[TreeMap in java.](https://www.flowerbrackets.com/treemap-in-java/)
[iterate TreeMap in java.](https://www.flowerbrackets.com/iterate-treemap-in-java/)
[Sort TreeMap by value in java.](https://www.flowerbrackets.com/java-treemap-sort-by-value/)
[Comparable interface in java.](https://www.flowerbrackets.com/comparable-interface-in-java/)
[Functional interface in java.](https://www.flowerbrackets.com/functional-interface-in-java/)
[TreeMap comparator() method in java with example.](https://www.flowerbrackets.com/java-treemap-comparator-method-example/)

**Core java — Miscellaneous**

[Why String is immutable in java.](https://www.flowerbrackets.com/why-string-is-immutable-in-java/)
[String charAt() method in java.](https://www.flowerbrackets.com/string-charat-method-in-java/)
[Strings in java.](https://www.flowerbrackets.com/strings-in-java/)
[String length() method in java.](https://www.flowerbrackets.com/string-length-method-java/)
[Compare two strings in java.](https://www.flowerbrackets.com/java-compare-two-strings/)
[String palindrome in java using stringbuffer.](https://www.flowerbrackets.com/string-palindrome-in-java-using-stringbuffer/)
[String palindrome in java using array.](https://www.flowerbrackets.com/string-palindrome-in-java-using-array/)
[String indexOf(String str, int fromIndex) method in java.](https://www.flowerbrackets.com/string-indexof-string-str-int-fromindex-method-in-java/)
[String toLowerCase(Locale locale) method in java.](https://www.flowerbrackets.com/string-tolowercase-locale-method-in-java/)
[String toUpperCase() method in java.](https://www.flowerbrackets.com/string-touppercase-method-java/)
[Uppercase to lowercase in java without using string function.](https://www.flowerbrackets.com/convert-uppercase-to-lowercase-in-java-without-using-string-function/)

**Core java Input/Output**

[create new file in java.](https://www.flowerbrackets.com/java-create-new-file/)
[rename file extension in java.](https://www.flowerbrackets.com/java-rename-file-extension/)
[rename all files in a folder in java.](https://www.flowerbrackets.com/java-code-to-rename-all-files-in-a-folder/)
[delete file in java.](https://www.flowerbrackets.com/java-delete-file/)
[rename file in java.](https://www.flowerbrackets.com/how-to-rename-file-in-java/)
[get file last modified date in java.](https://www.flowerbrackets.com/how-to-get-file-last-modified-date-in-java/)
[create directory in java.](https://www.flowerbrackets.com/how-to-create-directory-java/)
[delete directory in java recursively.](https://www.flowerbrackets.com/how-to-delete-a-directory-in-java/)

**Basic java programs with output**

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