Tuesday, January 31, 2017

Programming By Doing Lesson 12

Programming By Doing Lesson 12

Desired output:
My name is Jennifer Hurd and I'll graduate in 2099.

My working code:

public class StillUsingVariables
{

public static void main (String[] args )
{
int graduationYear;
String myName;

graduationYear = 2099;
myName = "Jennifer Hurd";

System.out.println("My name is " + myName + " and I'll graduate in " + graduationYear + "." );

}
}

No comments:

Post a Comment