Jayaprakash
Jayaprakash
aCount=a;
setGcount(g);
ANS:
The code fails to compile at line n1.
ANS:
Ensure that the class definition
used is the same as the class
definition used bu Java runtime at
the time when the object was
serialized.
Map<Optional<String>,
List<Employee>> r4 =
roster.stream()
.collect (Collectors.groupingBy(f,
Collectors.filtering(p,
Collectors.toList())));
ANS: A
ConcurrentModificationException is
thrown at run time.
ANS:
F2.foo(li) prints Hello world!
F1.foo(li) prints Bonjour le monde!
B1.foo(li) prints Hola Mundo!
ANS:
B cannot be abstract
B is a subtype of A
A cannot be final
ANS:
Move Character
Move GameObject
Move GameObject
ANS: 15
ANS: Double b=Double.valueOf(i);
Double d=1;
ANS: 80
ANS:
It must be executed once and only
before the first call to
DriverManager to get a Connection
Using the named JDBC driver.
ANS:
Paths.get(URI.create(file:///
domains/oracle/test.txt))
Path.get(“foo”)
ANS:
System.out.println
(Season.SPRING);
System.out.println(Season.valueOf(
“SPRING”));
System.out.println(sA[1]);
ANS: 1 2 [1,2,3,four] 3 4
ANS: Make foo and setB
synchronized.
ANS:
@Resource (“Customer1”)
@Resource((“Customer1”,
“Customer2”))
ANS:
A class declaration
An interface declaration
ANS: 5
ANS: Changed to Java
ANS: Marry
Joe
ANS: module com.company,clients {
Exports
com.company.client;
}
ANS: Test.class -> java.base
Test.class-> java.sql
ANS: 4
ANS: false
True
False
Map<Optional<String>,
List<Employee>> r4 roster.stream()
.collect (Collectors.groupingBy (f,
Collectors.filtering (p,
Collectors.toList())));
ANS: It is subjected to livelock
ANS: An exception is thrown at
runtime.
ANS: The compilation fails.
ANS: Fragment 2 because it
prevents SQL injection.
ANS: 08
ANS: myList.stream()
.collect (Collectors.tocollection
(TreeSet::new)) .stream().forEach
(x-> System.out.print(x));
ANS: The compilation fails
ANS: reader.read(characters);
ANS: A currenModificationException
is thrown at run time.
ANS: abc null
ANS: 13579
ANS: 3.0
ANS:System.out.print(p1.relativize (p3));
System.out.print(p2.relativize (p3));