网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

【单选题】下列代码存在一个编译错误。如何消除该错误?(左边为行号) 1 public void Test(object param) { 2 Resource r0 = new Resource(100); 3 using(Resource r1 = new Resource(100)) { 4 r1.print(); 5 r1 = new Resource(50); 6 } 7 }(2 分)

A.第1 行声明的param 参数未在方法内使用。删除该参数;

B.第3 行修改为:using(Resource r1 = new Resource(100);) {

C.删除第5 行

D.第5 行修改为:r1=r0;


参考答案和解析
line 10
更多 “【单选题】下列代码存在一个编译错误。如何消除该错误?(左边为行号) 1 public void Test(object param) { 2 Resource r0 = new Resource(100); 3 using(Resource r1 = new Resource(100)) { 4 r1.print(); 5 r1 = new Resource(50); 6 } 7 }(2 分)A.第1 行声明的param 参数未在方法内使用。删除该参数;B.第3 行修改为:using(Resource r1 = new Resource(100);) {C.删除第5 行D.第5 行修改为:r1=r0;” 相关考题
考题 Youarecreatingaresourceconsumergroupusingthe DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUPprocedure.Whichparameterwillyouusetodefinetheresourceschedulingmethodusedbetweensessionswithintheresourcegroup?()A.CPU_MTHB.NEW_CPU_MTHC.CPU_P1D.CPU_P2

考题 下列代码中,将引起一个编译错误的行是 1) public class Test{ 2) int m,n; 3) public Test(){} 4) public Test(inta){m=a;} 5) public static void main(String args[]){ 6) Test t1,t2; 7) int j,k; 8) j=0;k=0; 9) t1=new Test(); 10) t2=new Test(j,k); 11) } 12) }A.第3行B.第5行C.第6行D.第10行

考题 下列代码中,将引起编译错误的行是______。 (1) public class Test { (2) int m,n; (3) public Test( ){} (4) public Test(int A){m=a;} (5) public static void main(String args[ ]){ (6) Test t1,t2; (7) int j,k; (8) j=0;k=0; (9) t1=new Test( ); (10) t2=new Test(j,k); (11) 1 (12) }A.第3行B.第5行C.第6行D.第10行

考题 3下列代码中,将引起一个编译错误的行是( )。 1)public class Test{ 2)int m,n; 3)public Test(){} 4)public Test(int a){m=a;} 5)public static void main(String args[]){ 6)Test t1,t2; 7)int j,k; 8)j=0; k=0; 9) t1=new Test(); 10)t2=new Test(j,k); 11)} 12)}A.第3行B.第5行C.第6行D.第10行

考题 下列代码中,将引起一个编译错误的行是( )。 1)public class Test{ 2)int m,n; 3)public Test{} 4)public Test(int a){m=a;) 5)public static void main(String args[]){ 6)Test tl,t2; 7)int j,k; 8)j=0;k=0; 9)tl=new Test; 10)t2=new Test(j,k); 11)} 12)}A.第3行B.第5行C.第6行D.第l0行

考题 A Cluster Administrator is implementing a custom resource group for a new web application. The  goal is to ensure the resource group is always active. Preference should be given to the priority node at startup time,but fallback to the priority node should be scheduled during a nonbusy time.  Using custom resource group options, what combination best achieve the desired resource group behavior?()   A、 Online On All Available Nodes,using a setting timerB、 Online On Home Node Only,using a fallback timerC、 Online On Home Node Only,using both setting and fallback timersD、 Online On First Available Node,using both settling and fallback timers

考题 To load the base operating system on a machine using NIM, what are the minimum NIM resources   that must be defined for the installation to succeed()A、A mksysb resource, a SPOT resource, and an lpp_source resourceB、A SPOT resource, an lpp_source resource, and a machine definitionC、An lpp_source resource, a mksysb resource, and a machine definitionD、A SPOT resource, an lpp_source resource, a bosinst_data resource, and a machine definition

考题 A new administrator is performing fallover testing on a two-node cluster and is concerned that the cascading resource group belonging to Node ’A’ did not reintegrate properly after the cluster was restarted on Node ’A’. A stable cluster is reported by clstat,and clRGinfo reports the resource group online on Node ’B’.  What type of configuration would cause this type of behavior?()  A、 The resource group DNP has been configured.B、 The resource group option CWOF has been enabled.C、 The resource group option Inactive Takeover is set.D、 A resource group fallback timer has been configured.

考题 An administrator has integrated a new application into an existing resource group. An application server withstart and stop scripts was defined and added to the resource group definition. The cluster was thensynchronized. How can the new application be started with minimal downtime?()A、The administrator will need to perform an rg_move operationB、The administrator will need to un-manage and re-manage the resource groupC、The administrator will need to execute the new start script from the command lineD、The new start script will be executed as part of the DARE operation to synchronize the cluster

考题 To load a base operating system on a machine using NIM, what are the minimum NIM resources that must be defined for the installation to succeed?()A、A mksysb resource, a SPOT resource, and an lpp_source resourceB、A SPOT resource, an lpp_source resource, and a machine definitionC、An lpp_source resource, a mksysb resource, and a machine definitionD、A SPOT resource, an lpp_source resource, a machine definition, and a bootable CD

考题 public class TwoThreads {  private static Object resource = new Object();  private static void delay(long n) {  try { Thread.sleep(n); }  catch (Exception e) { System.out.print(”Error “); }  }  public static void main(String[] args) {  System.out.print(”StartMain “);  new Thread1().start();  delay(1000);  Thread t2 = new Thread2();  t2.start();  delay(1000);  t2.interrupt  delay(1000);  System.out.print(”EndMain “);  }  static class Thread 1 extends Thread {  public void run() {  synchronized (resource) {  System.out.print(”Startl “);  delay(6000);  System.out.print(”End1 “);  }  }  }  static class Thread2 extends Thread {  public void run() {  synchronized (resource) {  System.out.print(”Start2 “);  delay(2000);  System.out.print(”End2 “);  }  }  }  }  Assume that sleep(n) executes in exactly m milliseconds, and all other code executes in an insignificant amount of time. What is the output if the main() method is run?() A、 Compilation fails.B、 Deadlock occurs.C、 StartMain Start1 Error EndMain End1D、 StartMain Start1 EndMain End1 Start2 End2E、 StartMain Start1 Error Start2 EndMain End2 End1F、StartMain Start1 EndMain End1 Start2 Error End2

考题 You are creating a resource consumer group using the DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP procedure. Which parameter will you use to define the resource scheduling method used between sessions within the resource group?() A、 CPU_MTHB、 NEW_CPU_MTHC、 CPU_P1D、 CPU_P2

考题 You updated the resource plan directive for the resource consumer group, DSS_USERS. The resource plan directive is assigned to the DSS_PLAN by using the following statement:   SQLEXEC DBMS_RESOURCE_MANAGER.UPDATE_PLAN_DIRECTIVE  (PLAN = ’DSS_PLAN’,   GROUP_OR_SUBPLAN = ’DSS_USERS’,   NEW_CPU_P1 = 80,   NEW_SWITCH_GROUP = ’CANCEL_SQL’,   NEW_SWITCH_ESTIMATE = TRUE,   NEW_SWITCH_TIME = 600); A user connects to the database and starts an operation. What is the outcome if Oracle estimates that the execution time for this operation will exceed 600 seconds?()  A、 The session is killed before starting the operation.B、 The session generates an error before starting the operation.C、 The session switches to the CANCEL_SQL resource consumer group before starting the operation.D、 The session hangs before starting the operation.

考题 You are creating the simple resource plan using the DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_PLAN procedure. Which resource allocation policy will be used for the resource plan?()  A、 RATIOB、 EMPHASISC、 ACTIVE_SESS_POOL_MTHD、 RESOURCE_DEGREE_LIMIT_ABSOLUTE

考题 You have an Exchange Server 2010 organization.You need to ensure that a user can open a resource mailbox.What are two possible ways to achieve this goal?()A、From Microsoft Office Outlook, modify the properties of the resource mailbox.B、From the Exchange Management Console, create a new sharing policy.C、From the Exchange Management Shell, set the Resource Delegates parameter for the resource mailbox.D、From the Active Directory Users and Computers console, reset the password for the account associated to the resource mailbox, and then provide the password to the user.

考题 Terminal Services application runs on the server. Users report that the application stops responding. You monitor the memory usage on the server for a week. You discover that the application has a memory leak. A patch is not currently available.  You create a new resource-allocation policy in Microsoft Windows Server Resource Manager. You configure a Process Matching Criteria named TrackShip and select the application.  You need to terminate the application when the application consumes more than half of the available memory on the server. What should you do?()A、Configure the resource-allocation policy and set the maximum working set limit option to half the available memory on the server. Set the new policy as a Profiling Policy.B、Configure the resource-allocation policy and set the maximum working set limit option to half the available memory on the server. Set the new policy as a Managing Policy.C、Configure the resource-allocation policy and set the maximum committed memory option to half the available memory on the server. Set the new policy as a Profiling Policy.D、Configure the resource-allocation policy and set the maximum committed memory option to half the available memory on the server. Set the new policy as a Managing Policy.

考题 单选题A Cluster Administrator is implementing a custom resource group for a new web application. The  goal is to ensure the resource group is always active. Preference should be given to the priority node at startup time,but fallback to the priority node should be scheduled during a nonbusy time.  Using custom resource group options, what combination best achieve the desired resource group behavior?()A  Online On All Available Nodes,using a setting timerB  Online On Home Node Only,using a fallback timerC  Online On Home Node Only,using both setting and fallback timersD  Online On First Available Node,using both settling and fallback timers

考题 单选题You are creating the simple resource plan using the DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_PLAN procedure. Which resource allocation policy will be used for the resource plan?()A  RATIOB  EMPHASISC  ACTIVE_SESS_POOL_MTHD  RESOURCE_DEGREE_LIMIT_ABSOLUTE

考题 单选题A new administrator is performing fallover testing on a two-node cluster and is concerned that the cascading resource group belonging to Node ’A’ did not reintegrate properly after the cluster was restarted on Node ’A’. A stable cluster is reported by clstat,and clRGinfo reports the resource group online on Node ’B’.  What type of configuration would cause this type of behavior?()A  The resource group DNP has been configured.B  The resource group option CWOF has been enabled.C  The resource group option Inactive Takeover is set.D  A resource group fallback timer has been configured.

考题 单选题To load a base operating system on a machine using NIM, what are the minimum NIM resources that must be defined for the installation to succeed?()A A mksysb resource, a SPOT resource, and an lpp_source resourceB A SPOT resource, an lpp_source resource, and a machine definitionC An lpp_source resource, a mksysb resource, and a machine definitionD A SPOT resource, an lpp_source resource, a machine definition, and a bootable CD

考题 单选题An administrator has integrated a new application into an existing resource group. An application server withstart and stop scripts was defined and added to the resource group definition. The cluster was thensynchronized. How can the new application be started with minimal downtime?()A The administrator will need to perform an rg_move operationB The administrator will need to un-manage and re-manage the resource groupC The administrator will need to execute the new start script from the command lineD The new start script will be executed as part of the DARE operation to synchronize the cluster

考题 单选题You want to create a consumer group, GROUP1, and you execute the following command in the command-line interface:  SQL EXEC DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (CONSUMER_GROUP =’group1’, COMMENT = ’New Group’);  This command errorsout displaying the following message:  ERROR at line 1:  ORA-01031: insufficient privileges  ORA-06512: at "SYS.DBMS_RMIN", line 115  ORA-06512: at SYS.DBMS_RESOURCE_MANAGER", line 108 ORA-06512: at line 1  What action would you take to overcome this error?()A  grant SYSDBA to the userB  grant SYSOPER to the userC  grant the RESOURCE role to the userD  use the GRANT command to grant the ADMINISTER_RESOURCE_MANAGER privilege to the useE  grant the ADMINISTER_RESOURCE_MANAGER privilege to the user by using the DBMS_RESOURCE_MANAGER_PRIVS package

考题 单选题You want to create a consumer group, GROUP1, and you execute the following command in the command/x7fline interface:  SQL EXEC DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP  (CONSUMER_GROUP =’group1’, COMMENT = ’New Group’);  This command errors out displaying the following message:  ERROR at line 1:  ORA/x7f01031: insufficient privileges  ORA/x7f06512: at "SYS.DBMS_RMIN", line 115  ORA/x7f06512: at SYS.DBMS_RESOURCE_MANAGER", line 108 ORA/x7f06512: at line 1  What action would you take to overcome this error?()A grant SYSDBA to the userB grant SYSOPER to the userC grant the RESOURCE role to the userD use the GRANT command to grant the ADMINISTER_RESOURCE_MANAGER privilege to the userE grant the ADMINISTER_RESOURCE_MANAGER privilege to the user by using the DBMS_RESOURCE_MANAGER_PRIVS package

考题 单选题public class TwoThreads {  private static Object resource = new Object();  private static void delay(long n) {  try { Thread.sleep(n); }  catch (Exception e) { System.out.print(”Error “); }  }  public static void main(String[] args) {  System.out.print(”StartMain “);  new Thread1().start();  delay(1000);  Thread t2 = new Thread2();  t2.start();  delay(1000);  t2.interrupt  delay(1000);  System.out.print(”EndMain “);  }  static class Thread 1 extends Thread {  public void run() {  synchronized (resource) {  System.out.print(”Startl “);  delay(6000);  System.out.print(”End1 “);  }  }  }  static class Thread2 extends Thread {  public void run() {  synchronized (resource) {  System.out.print(”Start2 “);  delay(2000);  System.out.print(”End2 “);  }  }  }  }  Assume that sleep(n) executes in exactly m milliseconds, and all other code executes in an insignificant amount of time. What is the output if the main() method is run?()A  Compilation fails.B  Deadlock occurs.C  StartMain Start1 Error EndMain End1D  StartMain Start1 EndMain End1 Start2 End2E  StartMain Start1 Error Start2 EndMain End2 End1F StartMain Start1 EndMain End1 Start2 Error End2

考题 单选题Terminal Services application runs on the server. Users report that the application stops responding. You monitor the memory usage on the server for a week. You discover that the application has a memory leak. A patch is not currently available.  You create a new resource-allocation policy in Microsoft Windows Server Resource Manager. You configure a Process Matching Criteria named TrackShip and select the application.  You need to terminate the application when the application consumes more than half of the available memory on the server. What should you do?()A Configure the resource-allocation policy and set the maximum working set limit option to half the available memory on the server. Set the new policy as a Profiling Policy.B Configure the resource-allocation policy and set the maximum working set limit option to half the available memory on the server. Set the new policy as a Managing Policy.C Configure the resource-allocation policy and set the maximum committed memory option to half the available memory on the server. Set the new policy as a Profiling Policy.D Configure the resource-allocation policy and set the maximum committed memory option to half the available memory on the server. Set the new policy as a Managing Policy.

考题 单选题You updated the resource plan directive for the resource consumer group, DSS_USERS. The resource plan directive is assigned to the DSS_PLAN by using the following statement:   SQLEXEC DBMS_RESOURCE_MANAGER.UPDATE_PLAN_DIRECTIVE  (PLAN = ’DSS_PLAN’,   GROUP_OR_SUBPLAN = ’DSS_USERS’,   NEW_CPU_P1 = 80,   NEW_SWITCH_GROUP = ’CANCEL_SQL’,   NEW_SWITCH_ESTIMATE = TRUE,   NEW_SWITCH_TIME = 600); A user connects to the database and starts an operation. What is the outcome if Oracle estimates that the execution time for this operation will exceed 600 seconds?()A  The session is killed before starting the operation.B  The session generates an error before starting the operation.C  The session switches to the CANCEL_SQL resource consumer group before starting the operation.D  The session hangs before starting the operation.

考题 单选题To load the base operating system on a machine using NIM, what are the minimum NIM resources   that must be defined for the installation to succeed()A A mksysb resource, a SPOT resource, and an lpp_source resourceB A SPOT resource, an lpp_source resource, and a machine definitionC An lpp_source resource, a mksysb resource, and a machine definitionD A SPOT resource, an lpp_source resource, a bosinst_data resource, and a machine definition

考题 单选题You are creating a resource consumer group using the DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP procedure. Which parameter will you use to define the resource scheduling method used between sessions within the resource group?()A  CPU_MTHB  NEW_CPU_MTHC  CPU_P1D  CPU_P2