Java Basic Programming Practice

 Java Basic Programming Practice 

Question 01: Write a program to display your details?

Name : K.Ramkumar
Date of Birth : 13-March-1989
Address : No 27, Main St,Jaffna.

Question 02: Print the following shapes Use only System.out.println(...) (print-line) statement for each line of outputs.

 

* * * * *      * * * * *    * * * * *

 * * * * *     *       *     *     *

* * * * *      *       *      *   *

 * * * * *     *       *       * *

* * * * *      * * * * *        *

   (a)            (b)          (c)


Question 03: Write a program to print your first name and last name , full name

Question 04:Write the program to display the following details

Name:

Age:

Date of Birth:

Address:

Mobile:


Question 05: Write a Java program to print the result of the following operations

 

a. -5 + 8 * 6

b. (55+9) % 9

c. 20 + -3*5 / 8

d. 5 + 15 / 3 * 2 - 8 % 3

 

Expected Output :
43 
1 
19 
13


Question 06: Write a Java program to display the following pattern. 
Sample Pattern using system.out.println

   J    a   v     v  a                                                 

   J   a a   v   v  a a                                                

J  J  aaaaa   V V  aaaaa                                               

 JJ  a     a   V  a     a


Question 07: Write a Java program to swap two variables.

 

Question 08: Write a Java program to print a face
Expected Output

 +"""""+                                                 
[| o o |]                                                
 |  ^  |                                                 
 | '-' |                                                 
 +-----+

Area and Perimeter Calculation
College of Technology Jaffna, Information and Communication Technology
NVQ Level 5
Anoja Mageenthiran

 

Post a Comment

0 Comments