The interview was a bit difficult. They asked us questions from networking, Java, Programming concepts and Operating Systems. They had asked the networking OSI Layer, Bankers algorithm, Process scheduling algorithms in OS, semaphore, File Concepts. Most of the questions they asked me, are given below.
Round 3 – Technical 1
i) Write a program in Java that has a function named ‘log’. This function must keep writing texts into a file named ‘file1.txt’ continuously, until the file has 5000 words. When it reaches 5000, automatically, another file must get created named ‘file2.txt’, and the function log writes into this file. Process goes on and on.
ii) String str, str1, str2.
str=”abc”;
str1=”abc”;
str2=”abc”;
str.equals(str1) -->output??
str1==str2-->output??
iii) What is (the difference between) synchronized block and method?? What are their uses?
iv) What is (the difference between) abstract class and interface?? What are their uses?
v) What is (the difference between) static variable, method, class?? What are their uses?
vi) What is (the difference between) final variable, method, class?? What are their uses?
vii) What is (the difference between) checked and unchecked exceptions?? What are their uses?
viii) What is (the difference between) error and exceptions?? What are their uses?
ix) What is a HashMap? Where is it used?
x) How do you create a Dictionary?
Round 4 - Technical 2
1) I) Find the upstream and downstream speed of the boat(given some input data)
ii) Find the probability of getting odd numbers when 3 dices are thrown simultaneously.
2) Write a program to implement binary search.
3) Write a program that keeps on accepting numbers as input from the user. The program checks if the number is odd. If it is odd, store the number to an array. When the 10th odd number is stored, print all the numbers stored in the array.