Professional Documents
Culture Documents
Name:
Date:
KNOWLEDGE ASSESSMENT
A() {}
B() {var b = C.caller; alert(b);}
C() {var c = B.caller; B();}
D() {A();C();}
A;C;D;B;
A;C;B;D;A;C;B;B;
A;B;C;A;C;D;B;C;
A;C;B;D;A;C;B;C;
6
1. class Q6 {
2. public static void main(String args[]) {
3. Holder h = new Holder();
4. h.held = 100;
5. h.bump(h);
6. System.out.println(h.held);
7. }
8. }
9.
10. class Holder {
11. public int held;
12. public void bump(Holder theHolder) {
13. theHolder.held++; }
14. }
15. }
What value is printed out at line 6?
A. 0
B. 1
C. 100
D. 101
10.
}
11. }
12. }
Which variable cannot be referenced correctly at line 8?
A. a
B. b
C. c
D. d
16Which of the following statements about XML is false?
A. It has a limited number of tags
B. Its used to configure an application server trough web.xml
C. A xml file follows a tree structure
D. A xml file can be well formed but not valid
26What is a DTD?
A. It is used to validate a XML Schema
B. It is used to validate a XPath file
C. It is the acronym of Definition Type Document, and it is one of the two
basic set of rules used to define the structure of a well-formed XML
document
D. A specific XML used to define the industrial standard for the Turing
machines
(HttpServletRequest req, HttpServletResponse res)
27Which of the following is not a keyword or reserved word in
Java?
A. then
B. goto
C. while
D. case
28Which sentence is false about Stateful Session Beans?
A. Is a bean thats designed to service business processes that span multiple
method requests or transactions.
B. Does not retain any state from previousrequests.
C. Retain state on behalf of an individual client.
D. If a stateful session beans state is changed during a method invocation,
that same state will be available to that same client upon the following
invocation.
29(HTML/JAVASCRIPT/CSS) What is the exact scope of
finally{} in the errors management?
A. To force the script stop
B. To run instructions only if no errors/exceptions happened
C. To run instructions also if errors/exceptions happened
D. To identify the istructions that generated an error/exception
30(JAVA) What results from running the following code?
1. public class Xor {
2. public static void main(String args[]) {
3. byte b = 10; // 00001010 binary
4. byte c = 15; // 00001111 binary
5. b = (byte)(b ^ c);
6. System.out.println(b contains + b);
7. }
8. }
A. The output: b contains 10
B. The output: b contains 5
C. The output: b contains 250
D. The output: b contains 245
31(JAVA) Which of the following variables is defined by using the
keyword static?
A. Instance variable
B. Local variable
C. Class variable
D. Request attribute
32(SERVLET/JSP) Which of the following attributes is associated
to a ServletRequest object using the setAttribute(String key,
Object obj) method?
A. Request attributes
B. Session attributes
C. Context attributes
D. None of the above
33(HTML) What is the limit of tables you can nest within another
table?
A. four
B. unlimited
C. ten
D. two
34(JAVA) Which statement is true about this code?
1. class HasStatic
2. {
3. private static int x = 100;
4.
5. public static void main(String args[])
6. {
7.
HasStatic hs1 = new HasStatic();
8.
hs1.x++;
9.
HasStatic hs2 = new HasStatic();
10.
hs2.x++;
11.
hs1 = new HasStatic();
12.
hs1.x++;
13.
HasStatic.x++;
14.
System.out.println(x = + x);
15. }
16.}
A. Line 8 will not compile, because it is a static reference to a private
variable.
B. Line 13 will not compile, because it is a static reference to a private
variable.
C. The program compiles, and the output is x = 102.
D. The program compiles, and the output is x = 104.
a =6,
b =7
byte b = 5;
char c = 5;
short s = 55;
int i = 555;
float f = 555.5f;
b = s;
i = c;
if (f > b)
f = i;
A. 6
B. 7
C. 8
D. 9
41(JAVA) A threads run() method includes the following lines:
1. try {
2. sleep(100);
3. }catch (InterruptedException e) { }
Assuming the thread is not interrupted, which one of the following
statements is correct?
D. Telnet
50(JAVA) What will happen if you attempt to compile and run the
following code?
Integer ten=new Integer(10);
Long nine=new Long (9);
System.out.println(ten + nine);
int i=1;
System.out.println(i + ten);
A. 19 followed by 20
B. 19 followed by 11
C. Error: Can't convert java lang Integer
D. 10 followed by 1
51Your current application needs to be extensible and flexible to
changes in the data-source implementation. Which of the
following design patterns will you implement to ensure
meeting these requirements?
A. MVC
B. Value Object
C. Data Access Object
D. Facade
52(JAVA) Consider the following code:
1. for (int i = 0; i < 2; i++) {
2. for (int j = 0; j < 3; j++) {
3.
If (i == j) {
4.
continue;
5.
}
6. System.out.println(i = + i + j = + j);
7. }
8. }
Which line will not be part of the output?
A. i = 0 j = 0
B. i = 0 j = 1
C. i = 0 j = 2
D. i = 1 j = 0
${#lists.size(myList)}
${#list.size(myList)}
${#lists.length(myList)}
${#list.length(myList)}
action-state
object-state
decision-state
subflow-state
require([
"dijit/Calendar",
"dojo/date",
"dojo/domReady!"
], function(Calendar, date){
new Calendar({
value: new Date(),
isDisabledDate: function(d){
a. var d = new Date(d); d.setHours(0, 0, 0, 0);
b. var today = new Date(); today.setHours(0, 0, 0, 0);
c. return Math.abs(date.difference(d, today, "week")) > 0;
9. }
10. }, "mycal").startup();
11. });
1.
2.
3.
4.
5.
6.
require([
"dojo/parser",
"dojo/date",
"dijit/Calendar"
]);
<div id="mycal" data-dojo-type="dijit/Calendar" value="2009-08-07" data-dojoprops="isDisabledDate:dojo.date.locale.isWeekend"></div>
A The first fragment is a dojo widget but the second it is not
B The second fragment is a dojo widget but the first it is not
C Both of them are a dojo widget where the first is instantiated programmatically and the second
declaratively
D None of the above is correct
var myObject={
"developer":{
"name":"Bob",
"age":"15"
}
}