Q:-1
Java Program to Read The Number From Standard Input
Q:-2
Java Program to Get Input from the User
Q:-3
Java Program to Multiply Two Floating-Point Numbers
Q:-4
Java Program to Swap Two Numbers
Q:-5
Java Program to Add Two Binary Strings
Q:-6
Java Program to Add Two Complex Numbers
Q:-7
Java Program to Check Even or Odd Integers
Q:-8
Java Program to Find Largest Among 3 Numbers
Q:-9
Java Program to Find LCM of 2 numbers
Q:-10
Java Program to Find GCD or HCF of 2 numbers
Q:-11
Java Program to Display All Prime Numbers from 1 to N
Q:-12
Java Program to Check Leap Year
Q:-13
Java Program to Check Palindrome given number.
Q:-14
Java Program to Check Armstrong Number between Two Integers
Q:-15
1
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
Java Program to Check whether the input number is a Neon
Number.
Q:-16
Java Program to Check whether the input character is vowel or
consonant.
Q:-17
Write a program to find the sum of n natural numbers
Q:-18
Java Program to Find Factorial of a number
Q:-19
Java Program to Find Even Sum of Fibonacci Series Till number
N
Q:-20
Java Program to Calculate Simple Interest
Q:-21
Java Program to Calculate Compound Interest
Q:-22
Java Program to Find the Perimeter of a Rectangle
Q:-23
Java Program to Find Quotient and Remainder:
Q:-24
Java Program to Calculate the Power of a Number:
Q:-25
Permutation and Combination Program
Q:-26
Mirror Inverse Program in Java
Q:-27
How to Reverse a Number in Java
Q:-28
How to Print ASCII Value in Java
Q:-29
2
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
Java Program to Check if a Given Number is Perfect Square
Q:-30
Java Program to Check if a Number is Positive or Negative
Q:-31
Write a Java program that takes a number as input and prints
its multiplication table up to 10.
TInput a number: 8
Expected Output: 8 x 1 = 8 8 x 2 = 16 8 x 3 = 24 ... 8 x 10 =
80
Q:-32
write a program to count number of digits present in a given
integer value.
Input:-123
Output-3
Q:-33
Write a program to print all digits of a given integer value.
Input:-123
Output-3
2
1
Q:-34
Write a program to print a particular digit in a given
position from given integer value.
Input:-123456
2
Output-5
Q:-35
Write a Java program to print the area and perimeter of a
circle.
Test Data: Radius = 7.5
Area is = 176.71458676442586
3
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
Expected Output Perimeter is = 47.12388980384689
Q:-36
Write a Java program that takes three numbers as input to
calculate and print the average of the numbers.
Input:-123456
Output:-3
Q:-37
Write a Java program and compute the sum of an integer's
digits. Input Data: Input an integer: 25 Expected Output
The sum of the digits is: 7
Q:-38
Write a Java program to print numbers between 1 and 100
divisible by 3, 5 and both.
Sample Output:
Divided by 3:
3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48,
51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93,
96, 99.
Divided by 5:
5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80,
85, 90, 95.
Divided by 3 & 5:
15, 30, 45, 60, 75, 90
Q:-40
Write a Java program that takes a number from the user, number
should be an integer between 1 and 7. It displays the weekday
name.
Input:-3
Output:- Wednesday
Q:-41
Write a Java program to find the number of days in a month.
Input a month:- 2
4
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
Input a year: 2016
Expected Output:- February 2016 has 29 days.
Q:-42
Write a program to convert decimal to any base, like decimal
to octal.
Q:-43
Write a program to convert any base to decimal, like octal to
decimal.
Q:-44
Write a program to convert any base to any base, like binary
to octal.
Q:-45
Write a program to add to any base. like the addition of two
octal values.
Q:-46
Write a program to subtract any base. like the subtraction of
two octal values.
Q:-47
Write a program to multiply any base. like the multiplication
of two octal values.
Q:-48
Print the following Pattern.
*****
*****
*****
*****
*****
Q:-49 Print the following Pattern.
*
**
***
****
*****
Q:-50 Print the following Pattern.
5
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
1
12
123
1234
12345
Q:-51 Print the following Pattern.
1
22
333
4444
55555
666666
Q:-52 Print the following Pattern.
******
*****
****
***
**
*
Q:-53 Print the following Pattern.
123456
12345
1234
123
12
1
Q:-54 Print the following Pattern.
*
***
*****
*******
*********
Q:-55 Print the following Pattern.
*********
*******
*****
***
*
6
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
Q:-56 Print the following Pattern.
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
Q:-57 Print the following Pattern.
1
0 1
1 0 1
0 1 0 1
1 0 1 0 1
Q:-58 Print the following Pattern.
1 1
12 21
123 321
1234 4321
1234554321
Q:-59 Print the following Pattern.
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
Q:-60 Print the following Pattern.
A
A B
A B C
A B C D
7
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
A B C D E
A B C D E F
Q:-61 Print the following Pattern.
A B C D E F
A B C D E
A B C D
A B C
A B
A
Q:-62 Print the following Pattern.
A
B B
C C C
D D D D
E E E E E
F F F F F F
Q:-63 Print the following Pattern.
5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
Q:-64 Print the following Pattern.
E
E F
E F E
E F E D
E F E D C
Q:-65 Print the following Pattern.
A
ABA
ABCBA
ABCDCBA
8
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE
ABCDEDCBA
Q:-66 Print the following Pattern.
**********
**** ****
*** ***
** **
* *
* *
** **
*** ***
**** ****
**********
Q:-67 Print the following Pattern.
* *
** **
*** ***
**** ****
**********
**** ****
*** ***
** **
* *
Q:-68 Print the following Pattern.
*****
* *
* *
* *
*****
9
JAVA BASIC PROGRAMS FOR BEGINNER'S PRACTICE