click below
click below
Normal Size Small Size show me how
SCJA-drills-chap01
Question | Answer |
---|---|
What are packages? | Packages are containers for classes. |
What does package statement define? | A package statement defines the directory path where files are stored. |
What does package statement use for delimitation? | Periods |
What are the writing conventions regarding packages? | Package names should be lowercase and separated with underscores between words. |
Which package name beginnings are reserved? | To which company? |
How many package statements can a source file contain? | There can be zero or one package statement per source file. |
What is an import statement used for? | An import statement is used to include source code from external classes. |
Where in a source is an import statement occuring? | An import statement occurs after the optional package statement and before the class definition. |
How can an import statement define classes? | An import statement can define a specific class name to import or can use an asterisk to include all classes within a given package. |
What is awt and where is it included? | The Java Abstract Window Toolkit API is included in the java.awt package and subpackages. |
What is included in java.awt? | The java.awt package includes GUI creation and painting graphics and images functionality. |
What is Swing and where is it included? | The Java Swing API is included in the javax.swing package and subpackages. |
What does Swing support? | The javax.swing package includes classes and interfaces that support lightweight GUI component functionality. |
What are the Basic Input/Output related classes related? | The Java Basic Input/Output-related classes are contained in the java.io package. |
What is java.io package? What does it support? | The java.io package includes classes and interfaces that support input/output functionality of the file system, data streams, and serialization. |
What is java.net? What does it support? | Java networking classes are included in the java.net package, which includes classes and interfaces that support basic networking functionality that is also extended by the javax.net package. |
What is included in java.util? What does it support? | Fundamental Java utilities are included in the java.util package: includes classes and interfaces that support the Java Collections Framework, legacy collection classes, event model, date and time facilities, and internationalization functionality. |
What does javac do? | javac invokes the Java compliler. |
How is the Java compiler invoked? | The Java compiler is invoked with the javac[.exe] command. |
What does the compiler's -d option do? | The compiler’s -d command-line option defines where compiled class files should be placed. |
Which compliler's command-line option defines where compiled class files should be placed? | The compiler’s -d command-line option defines where compiled class files should be placed. |
In what conditions does the compiler’s -d command-line option will include the package location? | The compiler’s -d command-line option will include the package location if the class has been declared with a package statement. |
Which compiler’s command-line option defines the directory paths in search of classes? | The compiler’s -classpath command-line option defines directory paths in search of classes. |
What does the compiler's -classpath option do? | The compiler’s -classpath command-line option defines directory paths in search of classes. |
How is the Java interpreter invoked? | The Java interpreter is invoked with the java[.exe] command. |
What does the command java[.exe] do? | The Java interpreter is invoked with the java[.exe] command. |
What does the interpreter's switch -classpath do? | The interpreter’s -classpath switch defines directory paths to use at runtime. |
Which interpreter's switch defines the directory paths to use at runtime? | The interpreter’s -classpath switch defines directory paths to use at runtime. |
What does the interpreter's -D command-line option do? | The interpreter’s -D command-line option allows for the setting of system property values. |
Which iterpreter's command-line option allows for the setting of the system property values? | The interpreter’s -D command-line option allows for the setting of system property values. |
What is the correct syntax for the use of the interpreter's -D command-line option? | The interpreter’s syntax for the -D command-line option is -Dproperty=value. |
What does the interpreter's -version command-line option do? | The interpreter’s -version command-line option is used to return the version of the JVM and exit. |
Which of the interpreter's commmand-line option is used to return the version of the JVM and exit? | The interpreter’s -version command-line option is used to return the version of the JVM and exit. |