Tag Archives: static

Given: class Base { public static void main(String[] args) { System.out.println("Base " + args[2]); }

Given: class Base {public static void main(String[] args) {System.out.println(“Base ” + args[2]);}}public class Sub extends Base{public static void main(String[] args) {System.out.println(“Overriden ” + args[1]);}}And the commands:javac Sub.javajava Sub 10 20 30What is the result? A. Overridden 20 B. Base 30 Overridden 20 C. Base 30 D. Overridden 20 Base 30 Correct Answer: A

Given: public class SampleClass { public static void main(String[] args) { AnotherSampleClass asc = new

Given:public class SampleClass {public static void main(String[] args) {AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = newSampleClass();sc = asc;System.out.println(“sc: ” + sc.getClass());System.out.println(“asc: ” + asc.getClass());}}class AnotherSampleClass extends SampleClass {}What is the result? A. sc: class AnotherSampleClass asc: class SampleClass B. sc: class SampleClass asc: class AnotherSampleClass C. sc: class AnotherSampleClass asc: class AnotherSampleClass D. sc: class Object asc:… Read More »

Given: class Test int a1; public static void doProduct(int a) { a = a * a; ) public static void doString(StringBuilder

Given:class Testint a1;public static void doProduct(int a) {a = a * a;)public static void doString(StringBuilder s) {s.append(” ” + s);}public static void main(String[] args) {Test item = new Test();item.a1 = 11;StringBuilder sb = new StringBuilder(“Hello”);Integer i = 10;doProduct(i);doString(sb);doProduct(item.a1);System.out.println(i + ” ” + sb + ” ” + item.a1);}}What is the result? A. 100 Hello 121 B. 100 Hello… Read More »

Given: public class TestLoop { public static void main(String[] args) { int array[] = {0, 1, 2, 3, 4};

Given:public class TestLoop {public static void main(String[] args) {int array[] = {0, 1, 2, 3, 4};int key = 3;for (int pos = 0; pos < array.length; ++pos) {if (array[pos] == key) {break;}}System.out.print(“Found ” + key + “at ” + pos);}}What is the result? A. Found 3 at 2 B. Found 3 at 3 C. Compilation fails D. An… Read More »

Given: public class MainMethod { void main() { System.out.println("one"); } static void main(String args)

Given:public class MainMethod { void main() {System.out.println(“one”);}static void main(String args) {System.out.println(“two”);}public static void main(String[] args) {System.out.println(“three”);}void mina(Object[] args) {System.out.println(“four”);}}What is printed out when the program is excuted? A. two B. four C. one D. three Correct Answer: D

public class StringReplace { public static void main(String[] args) { String message = "Hi everyone!";

public class StringReplace {public static void main(String[] args) {String message = “Hi everyone!”;System.out.println(“message = ” + message.replace(“e”, “X”)); }}What is the result? A. A runtime error is produced. B. message = C. message = Hi XvXryonX! D. message = Hi Xveryone! E. message = Hi everyone! F. A compile time error is produced. Correct Answer: C

EIGRP is running across the core to exchange internal routes, and each router maintains iBGP adjacency with the other routers on the network. An operator has configured static routes on the edge routers R1 and R2 for IP address 10.0.1.1, which is used as a black hole route as shown. Which configuration should the operator implement to the management router to create a route map that will redistribute tagged static routes into BGP and create a static route to blackhole traffic with tag 777 that is destined to the server at 192.168.10.100?

router(config)# route-map blackhole-trigger router(config-route-map)# match tag 777 router(config-route-map)# set ip next-hop 10.0.1.1 router(config-route-map)# set origin igp router{config-route-map)# set community no-export Refer to the exhibit. EIGRP is running across the core to exchange internal routes, and each router maintains iBGP adjacency with the other routers on the network. An operator has configured static routes on the edge routers R1… Read More »

An organization wants to standardize the 802.1X configuration on their switches and remove static ACLs on the switch ports while allowing Cisco ISE to communicate to the switch what access to provide. What must be configured to accomplish this task?

A. dynamic access list within the authorization profile B. extended access-list on the switch for the client C. security group tag within the authorization policy D. port security on the switch based on the client’s information Answer: Option C. Explanation:  No answer description available for this question Show AnswerDiscussion The post An organization wants to standardize the 802.1X… Read More »

A packet is destined for 10.10.1.22. Which static route does the router choose to forward the packet?

A. ip route 10.10.1.0 255.255.255.240 10.10.255.1 B. ip route 10.10.1.20 255.255.255.252 10.10.255.1 C. ip route 10.10.1.16 255.255.255.252 10.10.255.1 D. ip route 10.10.1.20 255.255.255.254 10.10.255.1 Answer: Option B. Explanation:  No answer description available for this question. Show AnswerDiscussion The post A packet is destined for 10.10.1.22. Which static route does the router choose to forward the packet? appeared first… Read More »