September 2005
Beginner
576 pages
13h 6m
English
| Q1: | Can constructor methods send back a value like other methods? |
| A1: | No, because there's no way to receive that value. Unlike other methods that can be used as part of an equation, the argument of a method, or other statements, constructors are only handled in response to a new statement. There's no way for that statement to receive a value that would be sent by the method. |
| Q2: | Do you have to create an object to use class variables or methods? |
| A2: | Because class variables and methods aren't associated with a specific object, you don't need to create an object solely for the purpose of using them. The use of the Integer.parseInt() method is an example of this because you don't have to create a new Integer object just to convert a string to an ... |
Read now
Unlock full access