hw2 - "Mad" 5 Look up the API documentation for...

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

View Full Document Right Arrow Icon
CS 302 Homework 2 - Due Tuesday, June 21 Name: 1. What type of variable would you use to store the value 1.23e-31 ? 2. Is the toLowerCase method of the String class an accessor or mutator? Why? 3. Write code to both declare and create a Rectangle object named rect that is located at (1,2) and has height 12 and width 8 . 4. Look up the API documentatin for the String class. Which method would be appropriate for determining whether a string begins with the substring
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "Mad" ? 5. Look up the API documentation for the String class. Which method would be appropriate for removing all whitespace (spaces,tabs,etc.) from the beginning and ending of a string? 6. What is the output of the following code: String name = "dAve"; String name2 = name.toUpperCase(); System.out.println(name); System.out.println(name2);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online