-
-
-
-
String s2="shailesh";
System.out.println(s1.equals(s2));
System.out.println(s1==s2);">Tell me o/p of the mentioned code fragment.String s1 = "shailesh";String s2="shailesh";System.out.println(s1.equals(s2));System.out.println(s1==s2);
Answer is truetrueEvery time we make any string constant same memory referenced will be assigned if the string constant is same. That's why both obj. s1 and s2 refer to same memory.
-
-
-
-
What is difference RMI registry and OSAgent ?
Pls let me know
-
-
-
-
-
What is the public static void main(String args[]) & System.out.println()
public: public keyword is an access speciferstatic :allows main to be call without any instance of a timevoid: does not return any valuemain: main() is the method where java Applications beginSting args[] recives command line argumentsSystem: System is predefined class that provides access to the systemout : out is o/p streamprintln():displays the output
-
-
The number of subscripts(indexes) in 2D array is two(2).Both row and column size must be __________________.
Integer constantsExample: int a[2][3]; Here a is an array consisting of two rows with each row with each row consists of 3 integer elements
-
-
-
State true or false :- Is the procedure to own the moniter by many threads?
A) TrueB) FalseExplanation: It is not possible.
-
-
Java Interview Questions
Ans