Write a program to print your name ID and class by creating an object.
Answers
Answered by
10
Answer:
class first
{
public static void main(String args)
{
int a;
Scanner sc=new Scanner(System.in);
a=sc.nextInt();
System.out.println("enter the name id");
}
}
Answered by
8
Answer:
class namegenerator
{
public static void main(String args)
{
string a;
Scanner sc=new Scanner(System.in);
System.out.println("enter the name id");
a=sc.nextLine()
}
}
Explanation:
Similar questions