首页/ 题库 / [多选题]

看下面关于switch的语句&e的答案

看下面关于switch的语句 
switch(exp1 ) { } 
表达式exp1可以是()类型 

多选题
2022-07-12 01:54
A、int
B、char
C、byte
D、String
查看答案

正确答案
A | B | C

试题解析

感兴趣题目

You need to configure a new Company switch to support DTP. 
Which DTP switchport mode  parameter sets the switch port to actively send and respond to DTP negotiation frames? ()


Each of these vlans has one host each on its port SVI on vlan 1 - ip 192.168.1.11 with snm Switch B - 
Ports 3, 4 connected to ports 3 and 4 on Switch A 
Port 15 connected to Port on Router. 
Tasks to do 
1. Use non proprietary mode of aggregation with Switch B being the initiator -- Assumed use LACP with B being in Active mode 
2. Use non proprietary trunking and no negotiation -- Assumed use switchport mode trunk and switchport trunk encapsulation dot1q 
3. Restrict only to vlans needed 
-- Assumed either vtp pruning or allowed vlan list. vtp pruning command did not seem to work on the simulator so landed using allowed vlan list 
4. SVI on vlan 1 with some ip and subnet given 
5. Configure switch A so that nodes other side of Router C are accessible -- Assumed this to mean that on switch A default gatway has to be configured. 
6. Make switch B the root 
-- Could not get this to work. Exam hung when I tried the command spanning-tree vlan 1,21-23 priority 4096
 

 

int [] my_Array;   
my_Array = new int[5]; 
for(int count = 0; count <= 5; count++) 
System.out.println(my_Array[count]); 
以上Java代码运行的结果是()。 

在Java语言中,如果你有下面的类定义: 
Abstract class Shape{ Abstract void draw(); } 
class Square extendeds Shape{}
如果你试图编译上面的代码会发生()。 

在Java语言中,如果你有下面的类定义:  
abstract class Shape { 
abstract void draw();    }   
Class Square extends Shape {} 
如果你试图编译上面的代码会发生()。 

class java { 
public static void main(String [] java) {  
for (int Java = 1; Java 〈 java.length; Java++)  
System.out.print("java ");  
}  
}  
和命令行: 
java java java java java  
结果为:()  

You are designing a top-level OU structure to meet the business and technical requirements. 
Which top-evel OU or OUs should you use? ()

信产部制定的《通信建设工程监理管理规定》规定:通信建设工程监理收费标准应当()的监理服务收费标准。
根据信产部制定的《通信建设工程监理管理规定》,通信建设监理企业应当依照()代表建设单位对工程实施监理。

看下面关于switch的语句 
switch(exp1 ) { } 
表达式exp1可以是()类型 

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?() 

public class TestOne { 
public static void main (String[] args) throws Exception { 
Thread.sleep(3000); 
System.out.println(”sleep”); 
} 
} 
What is the result?() 

相关题目

Java语言中的switch语句属于( )语句。

给出下列java源代码: 
//Point x 
Public class Interesting{} 
在源代码//point x处添加()能符合java语法 

1. class Pizza { 
2. java.util.ArrayList toppings; 
3. public final void addTopping(String topping) { 
4. toppings.add(topping);
5. } 
6. } 
7. public class PepperoniPizza extends Pizza { 
8. public void addTopping(String topping) { 
9. System.out.println(”Cannot add Toppings”); 
10. } 
11. public static void main(String[] args) { 
12. Pizza pizza = new PepperoniPizza(); 
13. pizza.addTopping(”Mushrooms”); 
14. } 
15. } 
What is the result?() 

分析下列Java代码:  
class A { 
public static void main(String[] args)    {  
method();   }     
static void method()    {     try    { 
System.out.println("Hello");    System.exit(0);    }   
finally   { 
System.out.println("good-bye");  }   }    } 
编译运行后,输出结果是()。  
  

The switched LAN is shown below:

Study the exhibit above carefully. Switch SW5 is configured as the root switch for VLAN 10 but notfor VLAN 20. If the STP configuration is correct, what will be true about Switch SW5?()

根据信产部《移动通信工程钢塔桅结构设计规范》规定,钢塔架结构采用单独基础时,各单独基础间宜设置()进行拉结。

Assuming that the serializeBanana2() and the deserializeBanana2() methods will correctly use Java serialization and given: 
import java.io.*; 
class Food {Food() { System.out.print(”1”); } } 
class Fruit extends Food implements Serializable { 
Fruit() { System.out.print(”2”); } } 
public class Banana2 extends Fruit { int size = 42; 
public static void main(String [] args) { 
Banana2 b = new Banana2(); 
b.serializeBanana2(b); // assume correct serialization 
b = b.deserializeBanana2(b); // assume correct 
System.out.println(” restored “+ b.size + “ “); } 
// more Banana2 methods 
} 
What is the result?() 

在Java语言中,小明在他的包mypackage中定义了类My_Class, 在mypackage的子包mysubpackage中也有个类My_Class。小明用 import mypackage.*;引入包, 执行其中的语句: My_Class NewClass = new My_Class();时,将发生()。 

import java.util.*; 
public class PQ { 
public static void main(String[] args) { 
PriorityQueue pq = new PriorityQueue(); 
pq.add(”carrot”);
pq.add(”apple”); 
pq.add(”banana”); 
System.out.println(pq.poll() +”:” + pq.peek());
} 
} 
What is the result?() 



You work as a network engineer for . You study the exhibit carefully. Three switches are configured for HSRP. Switch1 remains in the HSRP listen state. 
What is the most likely cause of this status?()

现有:  
public interface A {}  
以下哪项声明是合法的?() 

class Birds { 
public static void main(String [] args) { 
try { 
throw new Exception(); 
} catch (Exception e) {
try { 
throw new Exception(); 
} catch (Exception e2) { System.out.print("inner "); } 
System.out.print("middle ");
} 
System.out.print("outer "); 
} 
} 
结果为:()  

public class Test { 
public static void aMethod() throws Exception { 
try { 
throw new Exception();
} finally { 
System.out.println(“finally”); 
} 
} 
public static void main(String args[]) { 
try { 
aMethod(); 
} catch (Exception e) { 
System.out.println(“exception”); 
} 
System.out.println(“finished”); 
} 
} 
What is the result?()  

import java.io.IOException;  
public class ExceptionTest(  
public static void main (Stringargs) 
try (  
methodA();  
) catch (IOException e) (  
system.out.printIn(“Caught IOException”); 
) catch (Exception e) (  
system.out.printIn(“Caught Exception”);  
)  
)  
public void methodA () {  
throw new IOException (); 
}    
What is the result?()  

现有:  
class ThreadExcept implements Runnable {  
public void run() { throw new RuntimeException("exception "); } 
public static void main(String [] args) {  
new Thread(new ThreadExcept()).start();  
try {  
int x = Integer.parseInt(args[0]);  
Thread.sleep(x);  
System.out.print("main ");   
} catch (Exception e) { }     
}  
}  
和命令行: 
java ThreadExcept 1000   
哪一个是结果?() 

现有: 
class ThreadExcept implements Runnable  { 
public void run()  {  throw new RuntimeException("exception ");  } 
public static void main(Stri_ng  []  args)  { 
new  Thread (new  ThreadExcept()).start(); 
try  { 
int x=Integer.parselnt (args [0]); 
Thread. sleep (x); 
System.out.print("main"); 
} catch (Exception e)  {  } 
} 
} 
和命令行:  java ThreadExcept l000    
哪一个是结果?()    

在J2EE中,有如下代码在Servlet1.Java中   
Import javax.servlet.*;   
Import javax.servlet.http.*   
Import java.io.IOException;    
Import java.io.PrintWriter;   
Public class Servlet1 extends HttpServlet{ 
Public void init () throw ServletException {}  
Public void service(HttpServletRequest request, 
HttpServletResponce response) throws ServletException,IOException{ 
PrintWriter out=response.getWriter();  
Out.println(“hello!”); } } 
假如编译Servlet要具备的环境都已经建立好。现在用完全正确的命令编译该文件,对于以下成熟正确的是()  

信产部制定的《通信建设工程监理管理规定》规定:通信建设监理企业()工程监理业务。

You want to enable the user, Scott, to change to the GRP1 consumer group by issuing the following code:       
SQL> EXEC DBMS_SESSION.SWITCH_CURRENT_CONSUMER_GROUP 
(’SCOTT’,       ’GRP1’, FALSE);  
How will you grant the switch privilege to the user, Scott?()  

String foo = “blue”; 
Boolean[]bar = new Boolean [1]; 
if (bar[0])  { 
foo = “green”; 
}  
What is the result? () 

广告位招租WX:84302438

免费的网站请分享给朋友吧