Skip to content

Latest commit

 

History

History
92 lines (92 loc) · 17 KB

File metadata and controls

92 lines (92 loc) · 17 KB
1
id475978: Can a private method be called by any other method in the same class?1475979: What is the key word to jump out of a method?1475980: If there is a statement after a "return" will the statement execute?1475981: What does the void do in a method definition?1475982: Assume you type the following code into the Interactions pane and then actually choose a picture from your computer:System.out.println(new Picture(FileChooser.pickAFile()));How do you tell DrJava to show the picture that you selected?1475983: The following code uses variable substitution:Picture pictureObj = new Picture(FileChooser.pickAFile());pictureObj.show();and is functionally the same as:String filename = FileChooser.pickAFile();Picture pictureObj = new Picture(filename);pictureObj.show();However, the second example is different in that it creates a variable name for the filename. What good is this?1