Part 2 Flashcards
What command (CLI) can we use to run a Java application?
java
eg: $ java Main
What command (CLI) we can use to compile Java source code to bytecode and create a class file?
javac
eg: $ javac Main.java
What command (CLI) we can use to disassemble one or more class files?
javap
What command (CLI) we can use to create JMOD files and list the content of existing JMOD files?
jmod
What command (CLI) we can use to generate HTML pages of API documentation from Java source files?
javadoc
How we can check with command (CLI) the java version?
java -version
What command we can use to manage a keystore(database) of cryptographic keys?
keytool
How we can sign and verify Java Archive files (JAR)? (CLI)
jarsigner
What command (CLI) we can use to read and write a plain text policy file based on user input through the utility GUI?
policytool
What command (CLI) we can use to start a graphical console to monitor and manage Java applications?
jconsole
What command we can use to list the instrumented JVMs on the target systems?
jps
What command we can use to launch Java Mission Control (JMS) - profiling monitoring diagnostics tool suite?
jmc
What compiler’s javac command line option defines directory paths in search of classes?
javac -classpath
What interpreter’s command line option defines directory paths to use at runtime?
java -classpath
What interpreter’s command line option we can use to set a system property value, what is its syntax?
java -D
java -Dproperty=value
What command line option can be applied either to interpreter or compiler to print out the tool’s usage information?
java -h
Which are the only applicable access modifiers for top level class?
public, , final, abstract, strictfp
Which are the applicable access modifiers for inner classes?
public, , final, abstract, strictfp, private, protected, static
What is it mean when a class is declared as public?
If a class is declared as public that we can access that class from anywhere, within the package or outside the package. public class Text {..}
What is it mean when the class declaration doesn’t content any access modifier?
If class doesn't include any modifier in declaration, it has the default modifier that means that class is accessible only within the same package. class Text {..}
What can be declared as final in java code?
Final is modifier applicable for classes, methods and fields.
What is it mean when class is declared as final?
If class is declared as final then we can’t create the child class, the inheritance concept is not applicable for final classes. public final class Text {..} Every method that is presented inside final class is always final by default whether we are declaring it or not. But every variable inside final class need not to be final. The final methods cannot be overriden in child class.
What is it meant when method is declared as final?
The final methods cannot be overriden in child class.
What kind of methods the final class can contain?
Every method that is presented inside final class is always final by default whether we are declaring it or not. But every variable inside final class need not to be final.