Computer Science, asked by arpita3493, 8 months ago

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
please  \:  \:  \:  \: answer \:  \:  \:  \:  question  \:  \:  \:  \: 8

Answers

Answered by parampremdhawa
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