0% found this document useful (0 votes)
31 views

Assignment - 01

The document contains examples of Java programs that print output using methods like println() and print(). The programs demonstrate printing: 1. A message with first and last name 2. Personal details like name, date of birth etc. 3. Educational details like school, year of passing etc. 4. A biodata combining personal and educational details. 5. The multiplication table of 5. 6. Text in different formats by manipulating print positions.

Uploaded by

Cool Srik
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Assignment - 01

The document contains examples of Java programs that print output using methods like println() and print(). The programs demonstrate printing: 1. A message with first and last name 2. Personal details like name, date of birth etc. 3. Educational details like school, year of passing etc. 4. A biodata combining personal and educational details. 5. The multiplication table of 5. 6. Text in different formats by manipulating print positions.

Uploaded by

Cool Srik
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction, Compiling & Executing a Java Program.

WAP To Print a Message and Your First Name and Last Name using
print() and println() method

class First
{
public static void main(String args[] )
{
System.out.println(" Hello My Name is ");
System.out.print("First Name ");
System.out.println("Last Name ");

}
}
WAP To Print Your Personal Details Using Print Method

class Personal
{
public static void main(String args[] )
{
System.out.println(" PERSONAL DETAILS ");
System.out.println(" ----------------------------- ");
System.out.println("Name : ");
System.out.println("Date of Birth : ");
System.out.println("Gender : ");
System.out.println("Email Id : ");
System.out.println("Contact No. : ");
System.out.println("Fathers Name : ");
System.out.println("Mothers Name : ");

}
}
WAP To Print Your Educational Details

class Educational
{
public static void main(String args[] )
{
System.out.println(" EDUCATIONAL DETAILS ");
System.out.println(" -------------------------------- ");
System.out.println("10 TH : ");
System.out.println("SCHOOL. : ");
System.out.println("YOP : ");
System.out.println("10 +2 / Diploma: ");
System.out.println("SCHOOL : ");
System.out.println("YOP : ");

}
WAP To Print Your Biodata

class Biodata
{
public static void main(String args[] )
{
System.out.println(" BIODATA ");
System.out.println(" ------------------------ ");
System.out.println("Name : ");
System.out.println("Date of Birth : ");
System.out.println("Gender : ");
System.out.println("Email Id : ");
System.out.println("Contact No. : ");
System.out.println("10 TH : ");
System.out.println("SCHOOL. : ");
System.out.println("YOP : ");
System.out.println("10 +2 / Diploma: ");
System.out.println("SCHOOL : ");
System.out.println("YOP : ");
System.out.println("Fathers Name : ");
System.out.println("Occupation : ");
System.out.println("Contact No : ");
System.out.println("Mothers Name : ");
System.out.println("Occupation : ");
System.out.println("Contact No : ");

}
WAP To Print table of 5

class Table
{
public static void main(String args[] )
{
System.out.println("5 * 1 = 5 ");
System.out.println("5 * 2 = 10");
System.out.println("5 * 3 = 15 ");
System.out.println("5 * 4 = 20");
System.out.println("5 * 5 = 25 ");
System.out.println("5 * 6 = 30 ");
System.out.println("5 * 7 = 35 ");
System.out.println("5 * 8 = 40 ");
System.out.println("5 * 9 = 45 ");
System.out.println("5 * 10 = 50 ");

}
WAP TO PRINT FOLLOWING FORMAT.
-----------------------------------------------------
TRIDENT ACADEMY OF TECHNOLOGY
--------------------------------------------------------
TRIDENT TRIDENT
ACADEMY OF ACADEMY
TECHNOLOGY OF
TECHNOLOGY

class Format
{
public static void main(String args[] )
{
System.out.println("
---------------------------------------- ---- ");
System.out.println(" TRIDENT ACADEMY
OF TECHNOLOGY ");
System.out.println("
--------------------------------------------- ");
}

class Format
{
public static void main(String args[] )
{
System.out.println(" TRIDENT ");
System.out.println(" ACADEMY OF ");
System.out.println(" TECHNOLOGY ");

}
class Format
{
public static void main(String args[] )
{
System.out.println("TRIDENT ");
System.out.println(" ACADEMY ");
System.out.println(" OF ");
System.out.println(" TECHNOLOGY ");

You might also like