Computer Science, asked by msrao4001, 7 months ago

Write a program to accept your friend’s name, Address, hobby
and display in different lines with proper message.

Answers

Answered by wdffhj
0

Answer:

import java.util.*;

class character

{

public static void main (string args[ ])

{

Scanner sc = new scanner ( System.in)

System.out.println( " Enter name , address and hobby );

string n = sc.nextLine();

String a = sc.nextLine();

string h = sc.nextLine();

System.out.println(" His name is "+ n)

System.out.println( " His address is "+ a)

System.out.println(" his hobby is"+ h)

}

}

Similar questions