11. public void someMethod(Object value) { 12. // check for null value .... 20. System.out.println(value.getClass()); 21. } What, inserted at line 12, is the appropriate way to handle a null value?()
第1题:
Which 4 statements regarding MPLS Label Stack Encoding is true?()
第2题:
Given the definition of MyServlet: 11.public class MyServlet extends HttpServlet { 12.public void service(HttpServletRequest request, 13.HttpServletResponse response) 14.throws ServletException, IOException { 15.HttpSession session = request.getSession(); 16.session.setAttribute("myAttribute","myAttributeValue"); 17.session.invalidate(); 18.response.getWriter().println("value=" + 19.session.getAttribute("myAttribute")); 20.} 21.} What is the result when a request is sent to MyServlet?()
第3题:
11. public class Test { 12. public void foo() { 13. assert false; 14. assert false; 15. } 16. public void bar(){ 17. while(true){ 18. assert false; 19. } 20. assert false; 21. } 22. } What causes compilation to fail?()
第4题:
String foo = “blue”; Boolean[]bar = new Boolean [1]; if (bar[0]) { foo = “green”; } What is the result? ()
第5题:
Given a method that must ensure that its parameter is not null: 11. public void someMethod(Object value) { 12. // check for null value ... 20. System.out.println(value.getClass()); 21. } What inserted at line 12, is the appropriate way to handle a null value?()
第6题:
You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column. The table currently contains data. The sales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?()
第7题:
The value of an int is undetermined.
The value of all numeric types is zero.
The compiler may issue an error if the variable is used before it is initialized.
The value of a String variable is (empty string).
The value of all object variables is null.
第8题:
Foo has the value of “”
Foo has the value of null.
Foo has the value of “blue”
Foo has the value of “green”
An exception is thrown.
The code will not compile.
第9题:
Design a trigger that verifies that the first names and surnames are not empty strings.
Design a check constraint that verifies that the first names and surnames are not empty strings.
Design a check constraint that uses a CLR user-defined function to verify that either the phone number is a null value or the format of the phone number is valid.
Design a trigger that uses a CLR user-defined function to verify that either the phone number is a null value or the format of the phone number is valid.
Design a check constraint that ensures that the phone number cannot be changed from a valid format to a null value or to an invalid format.
Design a trigger that ensures that the phone number cannot be changed from a valid format to a null value.
第10题:
assert value == null;
assert value !null, “value is null”;
if (value == null) { throw new AssertionException(”value is null”);
if (value == null) { throw new IllegalArgumentException(”value is null”);
第11题:
A value of 4 represents the Implicit NULL Label.
A value of 0 represents the IPv4 Explicit NULL Label.
A value of 1 represents the Router Alert Label. The use of this label is analogous to the use of theRouter Alert Option in IP packets (for example, ping with record route option)
A value of 2 represents the IPv6 Explicit NULL Label
A value of 1 represents the IPv1 Explicit NULL Label
A value of 3 represents the Implicit NULL Label
第12题:
Line 13
Line 14
Line 18
Line 20
第13题:
1. public class SimpleCalc { 2. public int value; 3. public void calculate() { value += 7; } 4. } And: 1. public class MultiCalc extends SimpleCalc { 2. public void calculate() { value -= 3; } 3. public void calculate(int multiplier) { 4. calculate(); 5. super.calculate(); 6. value *=multiplier; 7. } 8. public static void main(String[] args) { 9. MultiCalc calculator = new MultiCalc(); 10. calculator.calculate(2); 11. System.out.println(”Value is: “+ calculator.value); 12. } 13. } What is the result?()
第14题:
Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()
第15题:
int index = 1; boolean test = new Boolean; boolean foo= test [index]; What is the result?()
第16题:
10. public class Hello { 11. String title; 12. int value; 13. public Hello() { 14. title += “ World”; 15. } 16. public Hello(int value) { 17. this.value = value; 18. title = “Hello”; 19. Hello(); 20. } 21. } and: 30. Hello c = new Hello(5); 31. System.out.println(c.title); What is the result?()
第17题:
You need to design the restrictions on the Bank.Customers table. Which three actions should you perform?()
第18题:
assert value == null;
assert value != null, value is null;
if (value == null) { throw new AssertionException(value is null); }
if (value == null) { throw new IllegalArgumentException(value is null); }
第19题:
assert value == null;
assert value != null, value is null;
if (value == null) { throw new AssertionException(value is null); }
if (value == null) { throw new IllegalArgumentException(value is null); }
第20题:
An IllegalStateException is thrown at runtime.
An InvalidSessionException is thrown at runtime.
The string value=null appears in the response stream.
The string value=myAttributeValue appears in the response stream.
第21题:
Define the new column as NULL.Update the FriendlyName column to the same value as the productName column. Alter the FriendlyName column to be NOT NULL.
Define the new column as NOT NULL with a default value of ’Undefined.’
Define the new column as NULL. Use application logic to enforce the data constraint.
Define the new column as NULL with a default value of ’Undefined.’
第22题:
Foo has the value of 0.
Foo has the value of null.
Foo has the value of true.
Foo has the value of false.
An exception is thrown.
The code will not compile.
第23题:
foo has the value””
foo has the value null.
An exception is thrown.
The code will not compile.