Create a new project then create a new class named as Greeti

Create a new project, then create a new class named as Greeting, implement this project and display a greeting message including your full name including your middle name. For example: display “Hello, John W. Smith!” on screen

Solution

public class Greeting {

String name ;

}

class Main{

public static void main(String[] args) {

Greeting g = new Greeting();

g.name =\"John W. Smith\"

System.out.println(\"Hello,\"+g.name+\"!\");

}

}

Create a new project, then create a new class named as Greeting, implement this project and display a greeting message including your full name including your m

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site