Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| |||||||||||
Logging - Interview Questions and Answers for 'Abs' - 4 question(s) found - Order By Newest | |||||||||||
| |||||||||||
Ans. public class MyClass { static class MyThreadClass implements Runnable{ public void start() { Thread t = new Thread(this,"threadName"); t.start(); } @Override public void run() { System.out.println("Hello"); try { Thread.sleep(1000); System.out.println("Hello Again"); } catch (InterruptedException e) { e.printStackTrace(); } } } public static void main(String[] args){ MyThreadClass myThreadClass = new MyThreadClass(); myThreadClass.start(); MyThreadClass myThreadClass2 = new MyThreadClass(); myThreadClass2.start(); } } | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. int x = 1; int y = 2; int z = x; x = y; y = z; System.out.println("x="+x); System.out.println("y="+y); | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. int x = 1; int y = 2; x = x+y; y = x-y; x = x-y; System.out.println("x="+x); System.out.println("y="+y); | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||