Hello friends, welcome to Tech Naandi Solutions. Java has become the most popular and best programming language in the software industry. In this post, we will learn the top 5 JAVA Basic Programs.
We are here to help you to learn JAVA programming language, on our website we will provide all tutorials that you need to learn JAVA.
In this post, I am providing you the most important and basic programs for you, which help you to get the basic knowledge about JAVA programming.
I restricted copying of programs from my website because if you copy and paste these programs you won’t get knowledge of programming, try to type and learn programs 😊
The sum of two numbers in JAVA using Scanner Class
Example 1: Sum of Two Numbers
Output : Sum of two numbers is : 50
Example 2: Sum of Two Numbers Using Scanner Class
Output :Â
Enter Number 1 : 75
Enter Number 2: 25
Sum of two numbers is : 100
JAVA Program to check Even or Odd Number
What is Even NumberÂ
Even numbers are the numbers, that are exactly divisible by 2.All even numbers ends with 2,4,6,8 numbers, we can say that the number 234567894 is an even number because its ends with 2.😊
What is Odd NumberÂ
Odd numbers are the numbers, that are not exactly divisible by 2.All odd numbers ends with 1,3,7,9, numbers, we can say that the number 2345678949 is an even number because it ends with 9.😊
Example Program
Output 1:
Enter Any Number: 344568
The Given number is Even
Output 2:
Enter Any Number: 3445689
The Given number is ODD
JAVA Program to check Leap Year
What is Leap Year
We all know that a common year has 365 days, but a leap year contains 366 days by adding a 1 extra day to the month of February. A leap year comes once every 4 years.
We use simple logic to find a leap year is that if any year that is exactly divided by 4, then we can call it as a leap year.
Leap Year Program
Output 1:
Enter Any Year: 2020
2020 is a leap year
Output 2 :
Enter Any Year: 2002
2002 is not a leap year
Java program to find Vowel or consonant
What are Vowel and consonant
Before going to program let us see what are these vowels and consonants. In an English Alphabets A E I O U are called as vowels and remaining alphabets are called as consonants
Now we are going to write a Java program to find the given alphabet is vowel or consonant by using switch case.
Program to find Vowel or Consonant
Output 1:
Enter Any Alphabet: A
A is a Vowel
Output 2:
Enter Any Alphabet: N
N is a Consonant
Output 3:
Enter Any Alphabet: 4
Please Enter only Alphabets
Write a JAVA program to find given STRING is Palindrome or not
What is PalindromeÂ
A palindrome is nothing but a string or a number will remain the same even if you reverse the string/number.
Examples
121,141,191,………………………
Madam, Level, POP,………………………….
OutPut :
Enter Any String: MADAM
MADAM is a Palindrome = true
Also Read Our Trending Articles >>
- Buy Kitchen Essentials Online in India
- Best Deals on Bathroom Accessories | Tech Naandi Solutions
- Buy T-Shirts For Men At Best Prices Online
- Best Deals on Daily Needs | Tech Naandi Solutions
- Buy Kitchen Essentials Online in India
- Buy Mobile Accessories online at best prices
- Best useful gadgets on amazon
- Rechargeable Smart Bluetooth Body Composition Scale
- Best Deals on Wired and Wireless Mouse
- AdSense High CPC Keywords
Thanks for your support we will provide more tricks & tips for you. If you like our tricks, share these with your friends and join my Telegram Channel for more new tricks & tips.
Also Read Our New Trending Articles >>>>
- Buy Kitchen Essentials Online in India
- Best Deals on Bathroom Accessories | Tech Naandi Solutions
- Buy T-Shirts For Men At Best Prices Online
- Best Deals on Daily Needs | Tech Naandi Solutions
- Buy Kitchen Essentials Online in India
- Buy Mobile Accessories online at best prices
- Best useful gadgets on amazon
- Rechargeable Smart Bluetooth Body Composition Scale
- Best Deals on Wired and Wireless Mouse
- AdSense High CPC Keywords
10 comments
These are actually great ideas about blogging.
You have touched on some nice points here. Any way keep up writing.
Thank you
iam very happy to learn this website for java learner bro
Hi Bro
Thank You, I will provide more concepts very soon.
Hi, this is Leonard.
Today I have Visited your site, very nice design and contain very useful Content, keep posting more topics.
Thank you
Leonard Garcia.
Hi Leonard,
Thanks for your support.
It’s very helpful for me bro, keep posting more programs
Thanks for your support.
Seriously it was nice & proud of you Narendra good website with and simple programs & algorithms, keep it up, and all the best for more concepts coming up.
Thanks for your support Somasekhar.I will come up with more useful content to help my users.
Comments are closed.