Tina Questions
Tina Questions
<%@tagliburi="http://java.sun.com/jsp/jstl/core"prefix="c"%> ${item}
1.0,3,6,9,12
2.3,6,9,12
3.0,6,9,12
4.0,3,6,9
Answer-1
5. When using the to reference a Java Bean for use within a JSP, the id attribute
defines_______________.
1.The class name of the JavaBean
2.The package name of the JavaBean
3.The instance name of the JavaBean
4.Defines nothing as there is no id attirbute
Answer-3
14. To use java.util.List, what is the Spring Collections element that you need?
1.<list>
2. <List>
3.<lists>
4.<util:list>
18. How do you know in your Java program that an SQL warning is generated as a
result of executing an SQL statement in the database?
1.You must catch the checked SQL Exception that is thrown by the method that
executes the statement.
2.You must catch the unchecked SQLWarningException that is thrown by the
method that executes the statement.
3.You must invoke the getWarnings() method on the Statement object(or a sub
interface there of).
4.You must query the ResultSet object about possible warnings generated by the
database.
Correct-3
21. If we run the test suite as JUnitTest, what will be the order of execution of all the
four test classes?
@RunWith(Suite.class)
@SuiteClasses({
AnnotationsTests.class,
AssertTests.class,
CalculateTest.class,
EmployeeTest.class })
1.1)AnnotationsTests 2)CalculateTest 3)EmployeeTest 4)AssertTests
2.1)AnnotationsTests 2)AssertTests 3)CalculateTest 4)EmployeeTest
3.1)AnnotationsTests 2)CalculateTest 3)AssertTests 4)EmployeeTest
4.1)EmployeeTest 2)CalculateTest 3)AssertTests 4)AnnotationsTests
Correct-2
22. Pick the class that is NOT part of Java collection framework.
1.Map
2.List
3.Queue
4.Struct
Correct-4
25. What is the effect of executing the following JSP statement , assuming a class
with name Employee exists in classes package?
1.The code does not compile as there is no property attribute of setProperty tag.
2.The code does not compile as the property attribute cannot take * as a value
3.The code sets value of all properties of employee bean to “*”.
4.The code sets the values of all properties of employee bean matching parameters
in request object
@Test
Public void testA() {
System.out.println(name.getMethodName());
assertEquals(“testA”, name .getMethodName());
}
@Test
Public void testB() {
System.out.println(name.getMethodName());
assertEquals(“testB”,name.getMethodName());
}
}
1.TestA,testB
2.testBtestA
3.testA compile error
4.testB compile error
27. Which one of these statements about XML declaration of transaction manager
bean is NOT true?
a) The tx namespace provides JTA transaction manager declaration shortcut syntax.
b) The Id of the bean has to be transactionManager.
c) Depending on the application persistence technology, the
HibernateTransactionManager or the DataSourceTranasctionManager could be used
as bean class.
d) A default transaction timeout could be given.
astring.add("A");
astring.add("B");
astring.add("C");
a) {A-B-C}
b) {A}-{B}-{C}
c) {-A-}{-B-}{-C-}
a) Peek() returns the next item in line but dequeue() removes and returns the next
item in line
b) peek() and dequeue() return the next item in line
c) peek() and dequeue remove and return the next item in line
30. Which of the following terminologies are typically used with regards to AOP?
A. Concerns
B. Advice
C. Float
D. Pointcut
a) A, B, and D
b) A, C, and D
c) A, B, and C
d) B, C, and D
a) <props>
b) <prop>
c) <properties>
d) <property>