Professional Documents
Culture Documents
html
http://spoken-tutorial.org/watch/Java/Numerical+Datatypes/English/
https://www.tutorialspoint.com/java/java_basic_syntax.htm
Assignment 1
Example:
O/P Expected :
Welcome John
Write a Program to accept
two integers through the
3 command line
argument and print the sum
of the two numbers
Example:
C:\>java Sample 10 20
C:\>java Sample 10 20
Assignment 2
C:\>java Sample 12
Example2:
Switch
9
C:\>java Sample Statement
Example3:
C:\>java Sample 15
13 Write a program to print prime numbers between 10 and 99. For Loop
Write a Java program to find if the given number is prime
or not.
Example1:
C:\>java Sample
Example2:
C:\>java Sample 1
Example3:
14 For Loop
C:\>java Sample 0
Example4:
C:\>java Sample 10
Example5:
C:\>java Sample 7
Example1:
C:\>java Sample
16 For Loop
O/P Expected : Please enter an integer number
Example1:
C:\>java Sample 3
O/P Expected :
*
* *
* * *
Write a program to reverse a given number and print
Eg1)
I/P: 1234
While
17 O/P:4321
Eg2) Loop
I/P:1004
O/P:4001
Write a Java program to find if the given number is
palindrome or not
Example1:
Topics
o. Hands-on Assignment Status
Covered
One
Write a program to initialize an integer array and
1 print the sum and average of the array dimensional
Array
One
Write a program to initialize an integer array and
2 find the maximum and minimum value of an array dimensional
Array
One
Write a program to find the largest 2 numbers and the
5 smallest 2 numbers in the given array dimensional
Array
One
Write a program to initialize an array and print them
6 in a sorted fashion dimensional
Array
Example1:
C:\>java Sample 1 2 3
Example2:
C:\>java Sample 1 2 3 4
Two
10 Dimensional
O/P Expected : Array
1 2 3 4
5 6 7 8
9 10 11 12
Write a program to find greatest number in a 3*3
array. The program is supposed to receive 9 integer
numbers as command line arguments.
Example1:
C:\>java Sample 1 2 3
O/P Expected :
The given array is :
1 23 45
55 121 222
56 77 89
The biggest number in the given array is 222
Questions
1 What is JDK?
2 What is JRE?
7 What is a Compiler?
8 What is an Interpreter?
14 What are the data types in Java and what are their sizes?