What is faster for reading in Java ArrayList or HashMap and why?
Java Consultant Interview Questions
30,826 java consultant interview questions shared by candidates
Basic Java
explain logic of all above questions
constructor looping
Are you willing to work in Dallas and why Dallas?
Tell me about youself. Why you leave your last job.
What Is a Package?
5. The user of this class expected the output “Num: 1000000”. They got something else. What went wrong and how would you fix it? public class Test { public final static int NUMTHREADS = 1000; public final static int NUMLOOP = 1000; public static int num = 0; static class Mythread extends Thread { @Override public void run() { for (int i = 0; i < NUMLOOP; i++) { ++num; } } } public static void main(String argv[]) { Mythread threads[] = new Mythread[NUMTHREADS]; for (int i = 0; i < NUMTHREADS; ++i) { threads[i] = new Mythread(); threads[i].start(); } try { for (int i = 0; i < NUMTHREADS; ++i) { threads[i].join(); } } catch (InterruptedException e) { } System.out.println("Num: " + num); } }
overload vs override
Pseudo code
Viewing 221 - 230 interview questions