Tag: technology
Questions Related to technology
A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: java games.cards.Poker What allows the user to do this? A. put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java B. put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/.jar C. Put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/Poker.jar D. put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java E. put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuffijava/.jar F. put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java/Poker.jar
class Abc { int i=initialize(369); int j=initialize(); public int initialize() { return 318; } public void initialize(int i) { this.i=i; } public static void main(String a[]) { Abc abc=new Abc(); System.out.println("i="+abc.i); abc.initialize(369); System.out.println("after i="+abc.i); System.out.println("j="+abc.j); } }
class Abc { static { System.out.print("Static block "); display(); } public void display() { System.out.print("Display block "); } public static void main(String a[]) { System.out.print("Starting of Main block "); Abc abc=new Abc(); System.out.print("In the Main block "); abc.display(); } }
Given: classA {} class B extends A {} class C extends A {} class D extends B {} Which three statements are true? (Choose three.)