PROGRAMMING AND CODE
Assignemnt #14
Code
/// Name: Justin Li /// Period 7 /// Program Name: CreatingVariables /// File Name: CreatingVariables.java /// Date Finished: 9/14/15 public class MoreVariablesAndPrinting { public static void main( String[] args ) { String myName, myEyes, myTeeth, myHair; int myAge, myHeight, myWeight; double myWeightK; myName = "Justin Li"; myAge = 17; myHeight = 70; myWeight = 150; myEyes = "Black"; myTeeth = "Purple"; myHair = "Black"; myWeightK = myWeight / 2.2; System.out.println( "Let's talk about " + myName + "." ); System.out.println( "He's " + myHeight + " inches tall." ); System.out.println( "He's " + myWeight + " pounds." ); System.out.println( "He's got " + myEyes + " eyes and " + myHair + " hair." ); System.out.println( "His teeth are " + myTeeth ); System.out.println( "His weight is " + myWeightK + "in Kg"); System.out.println( "If I add " + myAge + ", " + myHeight + ", and " + myWeight + " I get " + (myAge + myHeight + myWeight) + "." ); } }