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

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

If this source code is contained in a file called SmallProg.java, what command should be used to compile it using the JDK?()   public class SmallProg {   public static void main(String args[])  { System.out.println("Good luck!"); }  }  

  • A、java SmallProg
  • B、avac SmallProg
  • C、javac SmallProg.java
  • D、java SmallProg main

参考答案

更多 “ If this source code is contained in a file called SmallProg.java, what command should be used to compile it using the JDK?()   public class SmallProg {   public static void main(String args[])  { System.out.println("Good luck!"); }  }  A、java SmallProgB、avac SmallProgC、javac SmallProg.javaD、java SmallProg main” 相关考题
考题 A Company.com developer is designing the presentation tier for a web application that relies on a complex session bean. The session bean is still being developed and the APIs for are NOT finalized. Any changes to the session bean API directly impacts the development of the presentation tier.  Which design pattern provides a means to manage the uncertainty in the API?()A、 View HelperB、 Front ControllerC、 Composite ViewD、 Intercepting FilterE、 Business DelegateF、 Chain of Responsibility

考题 Which of the following answer is correct to express the value 8 in octal number?()    A、 010B、 0x10C、 08D、 0x8

考题 public class X implements Runnable(    private int x;   private int y;   public static void main(Stringargs)  X that = new X();   (new Thread(that)).start();  (new Thread(that)).start();  )  public void run() (  for (;;) (  x++;   y++;   System.out.printIn(“x=” + x + “, y = ” + y);   )   )   What is the result?()  A、 Errors at lines 7 and 8 cause compilation to fail.B、 The program prints pairs of values for x and y that might not always be the same on the same line  (for example, “x=2, y=1”).C、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by  “x=1, y=1”).D、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears only for once (for example, “x=1, y=1”  followed by “x=2, y=2”).

考题 If you want to use the Java EE platform’s built-in type of authentication that uses a custom HTML page for authentication. Which two statements are true?()A、Your deployment descriptor will need to contain this tag: CUSTOM.B、The related custom HTML login page must be named loginPage.html.C、When you use this type of authentication, SSL is turned on automatically.D、You must have a tag in your deployment descriptor that allows you to point to both a login HTML pageand an HTML page for handling any login errors.E、In the HTML related to authentication for this application, you must use predefined variable names fort he variables that store the user and password values.

考题 Which type of event indicates a key pressed on a java.awt.Component?()  A、 KeyEventB、 KeyDownEventC、 KeyPressEventD、 KeyTypedEventE、 KeyPressedEvent

考题 int i= 1, j= 10 ;   do (   if (i++ --j) continue;  ) while (i5);   After execution, what are the values for I and j? ()A、 i = 6 and j= 5B、 i = 5 and j= 5C、 i = 6 and j= 4D、 i = 5 and j= 6E、 i = 6 and j= 6

考题 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

考题 class Car implements Serializable { }   class Ford extends Car { }   如果试图序列化一个Ford实例,结果为()  A、编译失败B、一个对象被序列化C、两个对象被序列化D、运行时异常被抛出

考题 Which the statement is true about web container session management()?A、 Access to session-scoped attributes is guaranteed to be thread-safe by the web container.B、 To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.C、 If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.D、 The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.