To learn Java or any other programming language, the only best way is to practice and practice more. The more you do the coding, the better you get as time passes.
These listed Java examples cover some very basic Java fundamentals and present you few alternative solutions to any single problem. This way, you will be able to learn how different approaches can solve a problem, and what are their benefits versus cost.
I will suggest you to take the references from these examples and try them on your own.
1. Java Basic Programs
- Java Console Input and Output Examples
- Java Program to Add Two Integers
- Program to print the average of n numbers
- Java program to check disarium number
- Java program to check happy number
- Java program to check harshad number
- Java program to check pronic number
- Java program to check deficient number
- How to determine prime number efficiently?
- Java program to print all prime numbers between 2 to N
- Java program to print the first N prime numbers
- Java program to swap two numbers
2. Java String Programs
- Java program to sort strings in alphabetical order
- Java program to reverse words in a String
- Java reverse string using recursion
- Java program to count vowels and consonants in a String
- Java program to remove all the white spaces from a string
- Java program to find duplicate words in a String
- Java program to check Palindrome String using Stack, Queue, For and While loop
3. Java Errors
Happy Learning !!
Leave a Reply