Professional Documents
Culture Documents
arrays arraylist -
List.immutable List.create
FALSE
"@FunctionalInterfaceinte"@FunctionalinterfaceMyFunctionalInterface{"
Iterator SetIterator MapIterator
Abstraction Inheritance Encapsulation
@Environment(..) @Property(...) @Value(...)
Answer
TRUE
Integer.MAX_VALUE
TRUE
ProcessBuilder
All of the above
1
@PostConstruct, @PreDestroy and @Resource
arraylist
List.of
FALSE
Option 2
Polymorphism
Value(...)
Question
Fill in the blank.
This is an example of preparedstatement interface that_______________
PreparedStatementstmt=con.prepareStatement("select*from emp");
ResultSetrs=stmt.executeQuery();
while(rs.next()){
System.out.println(rs.getInt(1)+""+rs.getString(2));
}
In the snippet below, what line of code needs to be added to move the cursor to the
3rd row in the resultset?
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","or
acle");
Statement
stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_
UPDATABLE);
ResultSetrs=stmt.executeQuery("select*from emp765")
Option A
Deletes the record
rs.move(3);
et.CONCUR_
Option B
Retrieves the record
By invoking the method get(...,Typetype) on the ResultSet, where Type is an object which represe
rs.next(3);
Option C
Updates the record
By invoking the method getValue(...), and cast the result to the desi
rs.absolute(3);
Option D Answer
Inserts the record Retrieves the record
rs.getString(3); rs.absolute(3);
Question Option A Option B Option C Option D Answer
Question
what do we use builder for in design patterns? Option A
You are creating an instance diagram using UML and you need to show that. How would you do that ?
httpSession
what servesfunction
does lambda http or https?
return?
something
benefits of on parameters
data injection ?of beans or xxxxx where I opted for ID and CLASS.
List,props,hashmaps,andarrayl
List,set,map,andprHashmaps,arraylist,list,andt Option B
JNDi method Key word method All of the above All of the above
of the above
Question Option A Option B
A user types the URL in a browser: GET methoPOST metho
http://www.javatraining.com/GH/index.html. Which HTTP request gets generated?
Option C Option D Answer
HEAD methoPUT methoGET method
Question Option A Option B
Is the resultset Updateable? (Study this topic dont remember options)
By default, ResultSet object can be moved forward only and it is not updatable.
But we can make this object to move forward and backward direction by passing either TYPE_SCROLL_INSENSIT
resultSet - connection
od as well as we can make this object as updatable by:
Question Option A Option B Option C Option D Answer
Question Option A Option B Option C Option D
Answer
Question Option A Option B Option C Option D Answer
Question Option A Option B Option C Option D
Answer
Question Option A Option B Option C Option D
Answer
Question Option A Option B Option C Option D Answer
Question
You are creating a class diagram using UML and you need to show that one of y
classes is an abstract class. How would you do that?
Option A Option B
Underline the name of the class in the Draw a dotted line between it and the other
Option C Option D
Use italics for the name of the class Draw an arrow with a hollow diamond head between it and the o
Answer
Option 3
Question Option A Option B Option C Option D Answer
Question Option A Option B Option C Option D
Which of the following is used aspect progr AOP Servlet JDBC Spring
Answer
AOP
Question Question
What attribute is added in the bean.xml to reduce or eliminate the need of and? Autodiscovery
Option B Option C Option D Answer
Autowire Scope Auto-detect Autowire
Question Option A Option B Option C Option D Answer
Question Option A Option B Option C Option D
how can you initialize beanInitializingB BeanInit Initializing InitBean
Answer
InitializingBean
Question Option A Option B Option C Option D Answer