gr8 Part1javaprogramwsanswerkey
gr8 Part1javaprogramwsanswerkey
1..Write a JAVA program to print To display the message “Welcome to Java Programming!!”
public class Message1
{
public static void main(String args[ ])
{
System.out.println("Welcome to Java Programming!!” );
}
}
4. Write a program to store name and age and display in the below format
Output:
Code:
public class program1
{
public static void main(String args[])
{
int age=15;
String name="Name";
char Section='A';
System.out.println("My Name is :"+name);
System.out.println("My age is :"+age);
}
}
III. Do the below programs have any errors?If yes,mention and write the output?
}
Ans:No errors,Result = 100
13. public class programb
{
public static void main(String[] args)
{
System.out.println("My name is:");System.out.println("Jane Doe");System.out.println("I am studying in Gr8"); }
}
Ans:My name is:
Jane Doe
I am studying in Gr8
*************************************************************************************************************