Java


What is wrong with this code:

public class NamePrinter {

public void printName() {
System.out.println("My name is: " + myName);
}

public static void main( String[] args ) {

String myName = "George Washington";

NamePrinter namePrinter = new NamePrinter();
namePrinter.printName();
}
}

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Java
Reference No:- TGS01100004

Expected delivery within 24 Hours