September 2005
Beginner
576 pages
13h 6m
English
| Q1: | Can a single Java program be both an applet and an application? |
| A1: | It is possible to make a program serve as both applet and application, but it's often an unwieldy solution unless the program is simple. An applet could be set up to run as an application also by including a main() block in the applet, but you would not be able to use the init() block or paint() block in the automatic fashion they are used in an applet. Most programs are written as either an application or as an applet, rather than attempting to do both. |
| Q2: | Do all arguments sent to a Java application have to be strings? |
| A2: | Java makes all arguments into strings for storage when an application runs. When you want to use one of these arguments as an integer or some other ... |
Read now
Unlock full access