System.out.println(a);
8. Write a code showing the use of new operator.
9. Write a simple program to print your name and your fathe
Answers
Answered by
1
import java.util.*;
class Sample
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter your name");
String name=sc.nextLine();
System.out.println("My name is "+name);
}
}
Similar questions