Mr. Truncale - Robert E. Lee High School
  • Home
  • Digital Media
    • HTML
  • Video Game Design
  • Comp. Programming I
  • Comp. Programming II
  • AP Computer Science
  • 3D Printing
  • Teacher Resources
  • Contact Me

Class Notes for Output


// Prints to screen
System.out.println("Adam Truncale"); 

// Prints but stays on current line after output
System.out.print("Hello");

// Prints blank line
System.out.println(); 

System.out.println("This is a \"quote\"");
System.out.println("This is a \t tab");
System.out.println("This is a forward // slash"); 
System.out.println("This is an apostrophe \'");
System.out.println("This is a line \n break");

//Will add numbers/variables until it reaches a string
//Treats rest of number/variables as strings.

System.out.println(1+2+"=3");
System.out.println("3="+1+2);
//if you want them to add put them in ()
System.out.println("3="+(1+2));

Videos


Robert E. Lee High School
1809 Market
Baytown, TX 77520
281-420-4535
digital media | computer programming I and II | BIM
ap computer science | architectural cad | video game design
national technical honor society | contact me