// write the outline for an empty class (no main()) public class Testing { }
// write a println() statement System.out.println( "Here are " + count + " words." );
// write a println() statement containing escape sequences System.out.println( "\t_X_\n\tXXX\n\t_X_\n\t_X_\n" );
// do a simple conversion using variables and numbers double miles = feet / 5280; double kelvin = celsius + 273.15;
// translate a math formula to Java x = (-b + Math.sqrt(b*b - 4*a*c)) / (2*a);
// store a random number into a variable x = 1 + (int)(Math.random()*10);
// write an if statement that is true 1/4 of the time using Math.random if ( Math.random() < 0.25 ) { }
// write a valid function call with literal values or variables drawFace(100, 100, wid, hite);
©2013–2015 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.