Write a program in JAVA to print your name and your class
Answers
Answered by
5
Answer:
import java.util.*;
class ABC
{public static void main()
{Scanner Sc=new Scanner(System.in);
String n;
int cl;
System.out.println("enter your name and class");
n=Sc.nextLine();
cl=Sc.nextInt();
System.out.println("Name-"+n);
System.out.println("Class-"+cl);
}
}
Answered by
2
Answer:
class Biodata
{
public static void main(String args[])
{
System.out.println("Name is="+Name);
System.out.println("Class is="8);
}
}
Note-You can replace the name and class section and put the values you need.
Similar questions