网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
现有: class Tree { private static String tree = "tree "; String getTree () { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main (String [] args) { new Elm() .go (new Tree()) ; } } void go (Tree t) { String s = t.getTree () +Elm.tree + tree + (new Elm() .getTree ()) ; System.out.println (s) ;} 结果为:()
A
elm elm elm elm
B
tree elm elm elm
C
tree elm elm tree
D
tree elm tree elm
参考答案
参考解析
解析:
暂无解析
更多 “单选题现有: class Tree { private static String tree = "tree "; String getTree () { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main (String [] args) { new Elm() .go (new Tree()) ; } } void go (Tree t) { String s = t.getTree () +Elm.tree + tree + (new Elm() .getTree ()) ; System.out.println (s) ;} 结果为:()A elm elm elm elmB tree elm elm elmC tree elm elm treeD tree elm tree elm” 相关考题
考题
●Traversing a binary tree in preorder is equivalent to (68) .(68) A.Traversing the forest corresponding to the binary tree in root-first orderB.Traversing the forest corresponding to the binary tree in root-last orderC.Traversing the forest corresponding to the binary tree in breadth-first orderD.None of the above
考题
It is believed that the tradition of having a pine tree as a Christmas Tree comes from Germany.()
考题
finalclassTree{privatestaticStringtree=tree;StringgetTree(){returntree;}}classElmextendsTree{privatestaticStringtree=elm;publicstaticvoidmain(String[]args){newElm().go(newTree());}voidgo(Treet){Strings=t.getTree()+Elm.tree+tree+(newElm().getTree());System.out.println(s);}}结果为:()A.elmelmelmelmB.treeelmelmelmC.treeelmtreeelmD.编译失败
考题
现有:classTree{privatestaticStringtree=tree;StringgetTree(){returntree;}}classElmextendsTree{privatestaticStringtree=elm;publicstaticvoidmain(String[]args){newElm().go(newTree());}}voidgo(Treet){Strings=t.getTree()+Elm.tree+tree+(newElm().getTree());System.out.println(s);}结果为:()
考题
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(35); b=(a==true); System.out.println(”a=”+a+”b=+b) ; c=(b==false); System.out.printhln(”b=”+b+”c=”+c) ; } }A.a=true b=false b=true c=falseB.a=true b=false b=true c=trueC.a=true b=true b=tree c=falseD.a=false b=false b=tree c=false
考题
Traversing a binary tree in preorder is equivalent to(68).A.Traversing the forest corresponding to the binary tree in root-first orderB.Traversing the forest corresponding to the binary tree in root-last orderC.Traversing the forest corresponding to the binary tree in breadth-first orderD.None of the above
考题
考虑如下代码:class Tree{}class Pine extends Tree{}class Oak extends Tree{}public class Forest {public static void main( String[] args ) {Tree tree = new Pine();if( tree instanceof Pine )System.out.println( "Pine" );if( tree instanceof Tree )System.out.println( "Tree" );if( tree instanceof Oak )System.out.println( "Oak" );elseSystem.out.println( "Oops" );}}则输出结果中有哪些?A.Pine B.Tree C.Forest D.Oops E.无输出
考题
Which command enhances the 802.1D convergence time on ports that are connected to hosts?()
A. spanning-tree backbonefastB. spanning-tree uplinkfastC. spanning-tree portfastD. spanning-tree cost512
考题
Which command enables RSTP on a switch?()
A. spanning-tree mode rapid-pvstB. spanning-tree uplinkfastC. spanning-tree backbonefastD. spanning-tree mode mst
考题
Which two of these statements correctly describe classic PIM-SM?()A、The IOS default is for a last-hop router to trigger a switch to the shortest path tree as soon as a new source is detected on the shared tree.B、The IOS default is for every one of the routers on the shared tree to trigger a switch to the shortest path tree as soon as a new source is detected on the shared tree.C、The default behavior of switching to the shortest path tree as soon as a new source is detected on the shared tree can be disabled by setting the value in the ip pim spt-threshold command to "infinity."D、The default behavior of switching to the shortest path tree as soon as a new source is detected on the shared tree can be disabled by setting the value in the ip pim spt-threshold command to "zero."
考题
What is the Cisco IOS default behavior for switching from the shared tree to the shortest path tree in PIM-SM operations?()A、immediately after receiving the first packet on the shared tree for a given (S,G)B、after receiving over 1 kb/s traffic onthe shared tree for a given (S,G)C、10 seconds after receiving the first packet on the shared tree for a given (S,G)D、30 seconds after receiving the first packet on the shared tree for a given (S,G)E、after receiving over 10 kb/s traffic onthe shared tree for a given (S,G)
考题
现有: class Tree { private static String tree = "tree "; String getTree () { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main (String [] args) { new Elm() .go (new Tree()) ; } } void go (Tree t) { String s = t.getTree () +Elm.tree + tree + (new Elm() .getTree ()) ; System.out.println (s) ;} 结果为:() A、 elm elm elm elmB、 tree elm elm elmC、 tree elm elm treeD、 tree elm tree elm
考题
Which command enables RSTP on a switch?()A、spanning-tree mode rapid-pvstB、spanning-tree uplinkfastC、spanning-tree backbonefastD、spanning-tree mode mst
考题
Which command enhances the 802.1D convergence time on ports that are connected to hosts?()A、spanning-tree backbonefastB、spanning-tree uplinkfastC、spanning-tree portfastD、spanning-tree cost512
考题
Which two statements about the various implementations of STP are true?()A、mon Spanning Tree maintains a separate spanning-tree instance for each VLAN configured in the network.B、The Spanning Tree Protocol (STP) is an evolution of the IEEE 802.1w standard.C、Per-VLAN Spanning Tree (PVST) supports 802.1Q trunking.D、Per-VLAN Spanning Tree Plus(PVST+) is an enhancement to 802.1Q specification and is supported only on Cisco devices.E、Rapid Spanning Tree Protocol (RSTP) includes features equivalent to Cisco PortFast, UplinkFast, and BackboneFast for faster network reconvergence.F、Multiple Spanning Tree (MST) assumes one spanning-tree instance for the entire Layer 2 network, regardless of the multiple number of VLANs
考题
final class Tree { private static String tree = "tree "; String getTree() { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main(String [] args) { new Elm().go(new Tree()); } void go(Tree t) { String s = t.getTree()+Elm.tree+tree+(new Elm().getTree()); System.out.println(s); } } 结果为:() A、elm elm elm elmB、tree elm elm elmC、tree elm tree elmD、编译失败
考题
public class Plant { private String name; public Plant(String name) { this.name = name; } public String getName() { return name; } } public class Tree extends Plant { public void growFruit() { } public void dropLeaves() { } } Which is true?() A、 The code will compile without changes.B、 The code will compile if public Tree() { Plant(); } is added to the Tree class.C、 The code will compile if public Plant() { Tree(); } is added to the Plant class.D、 The code will compile if public Plant() { this(”fern”); } is added to the Plant class.E、 The code will compile if public Plant() { Plant(”fern”); } is added to the Plant class.
考题
import java.io.*; public class Forest implements Serializable { private Tree tree = new Tree(); public static void main(String [] args) { Forest f= new Forest(); try { FileOutputStream fs = new FileOutputStream(”Forest.ser”); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(f); os.close(); } catch (Exception ex) { ex.printStackTrace(); } } } class Tree { } What is the result?() A、 Compilation fails.B、 An exception is thrown at runtime.C、 An instance of Forest is serialized.D、 A instance of Forest and an instance of Tree are both serialized.
考题
单选题哪个命令可以在交换机启用RSTP? ()A
spanning-tree mode rapid-pvstB
spanning-tree uplinkfastC
spanning-tree backbonefastD
spanning-tree mode mst
考题
单选题Which spanning-tree command would cause a PortFast-enabled interface to lose its PortFast-operational status and disable BPDU filtering if it receives BPDUs?()A
spanning-tree guard rootB
spanning-tree portfast bpduguard defaultC
spanning-tree bpduguard enableD
spanning-tree bpdufilter enableE
spanning-tree portfast bpdufilter default
考题
单选题import java.io.*; public class Forest implements Serializable { private Tree tree = new Tree(); public static void main(String [] args) { Forest f= new Forest(); try { FileOutputStream fs = new FileOutputStream(”Forest.ser”); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(f); os.close(); } catch (Exception ex) { ex.printStackTrace(); } } } class Tree { } What is the result?()A
Compilation fails.B
An exception is thrown at runtime.C
An instance of Forest is serialized.D
A instance of Forest and an instance of Tree are both serialized.
考题
单选题public class Plant { private String name; public Plant(String name) { this.name = name; } public String getName() { return name; } } public class Tree extends Plant { public void growFruit() { } public void dropLeaves() { } } Which is true?()A
The code will compile without changes.B
The code will compile if public Tree() { Plant(); } is added to the Tree class.C
The code will compile if public Plant() { Tree(); } is added to the Plant class.D
The code will compile if public Plant() { this(”fern”); } is added to the Plant class.E
The code will compile if public Plant() { Plant(”fern”); } is added to the Plant class.
考题
单选题Which command enables RSTP on a switch?()A
spanning-tree mode rapid-pvstB
spanning-tree uplinkfastC
spanning-tree backbonefastD
spanning-tree mode mst
考题
单选题final class Tree { private static String tree = "tree "; String getTree() { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main(String [] args) { new Elm().go(new Tree()); } void go(Tree t) { String s = t.getTree()+Elm.tree+tree+(new Elm().getTree()); System.out.println(s); } } 结果为:()A
elm elm elm elmB
tree elm elm elmC
tree elm tree elmD
编译失败
考题
单选题What is the Cisco IOS default behavior for switching from the shared tree to the shortest path tree in PIM-SM operations?()A
immediately after receiving the first packet on the shared tree for a given (S,G)B
after receiving over 1 kb/s traffic onthe shared tree for a given (S,G)C
10 seconds after receiving the first packet on the shared tree for a given (S,G)D
30 seconds after receiving the first packet on the shared tree for a given (S,G)E
after receiving over 10 kb/s traffic onthe shared tree for a given (S,G)
热门标签
最新试卷