Outprintlnhelloworld one line comment

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rgs the command line arguments * Standard comment */ */ public staLc void main(String args) { System.out.println(“Hello World!”); // One-line comment } } CPSC 324 ‐‐ Spring 2010 4 2 1/19/10 Running javadoc •  Run the “javadoc” command to get the documentation % javadoc ‐author ‐version HelloWord.java ‐d docs •  Open docs/index.html file CPSC 324 ‐‐ Spring 2010 5 CPSC 324 ‐‐ Spring 2010 6 Exercise 1 3 1/19/10 Exercise 1 Answers public class DooBee { public staLc void main(String args) { int x = 1; while(x < 3 ) { System.out. print ("Doo"); What would happen if System.out. print ("Bee"); we used println? x = x + 1; } if(x == 3 ) { System.out.print("Do"); } } } CPSC 324 ‐‐ Spring 2010 7 CPSC 324 ‐‐ Spring 2010 8 Exercise 2 4 1/19/10 Exercise 2 Answers (parens removed) { ; public class Shuffle1 { if(x == 1) print(“d”) stem.out. Sy publi...
View Full Document

This document was uploaded on 03/18/2014 for the course CPSC 324 at Gonzaga.

Ask a homework question - tutors are online