Funny Interview Answers
As a software professional for reputed MNC, taking interviews are also part of my job profile. Following are the funniest answers that I got while doing interviews. The questions are mostly Java, Hibernate and Oracle specific. All these answers were given by real people in real interviews. Just blogging them for fun. Enjoy... and please don't give these answers in interviews :) :)
Friday, November 14, 2014
Part 1
1. Can you override equals() method?
No, Because equals is method in String class and String class can't overridden.(excellent...)
2.Why do you need to override hashcode() method?
Because by default it gives some random hexadecimal number which I don't like it. (hmmm....)
3.How to resolve Out Of Memory Error?
Increase the disc space... wow... (I didn't know this)
4.What if you get the Out of Memory after increasing the disk space also?
Then only solution I can think of is to change the Server machine... (Don't know what to ask after this)
5.What happens when you enter www.google.com in browser?
I didn't work in google.... (me too yar)
6.What is the difference between List and ArrayList ?
List is sorted collection, ( Zzzzzz...) and ArrayList is not sorted...
7.Give an example of compile time exception?
For example, remove the semicolon at end of line, then you will get red line. (Ohhh my god....)
8.Is it possible to call run() method ourselves? something like t.run()?
NO, run() method is private, only JVM can call private methods... (what the .....)
9.How can we create our own immutable class?
String is the only immutable class, we can't create our own immutable classes... (is it????)
10.Is it possible to increase the size of heap space?
Heap is managed by JVM ( great...), we can't increase or decrease its size... (problem solved...)
11.Can we create indexes for column in oracle?
Oracle is very advance database (I think I know that... next.. ) It manages the indexes and creates them when necessary. It will not allow us to create index... (wow, may be new version of Oracle.)
12.Can write update query to update salary of employee whose id is 67?
"select * from employee where id = 67 for update", and edit the row. (non sense..)
13.What is difference between truncate and delete commands?
Truncate will drop database ( database ????), delete will drop table ( Oh man....)
14.Is it possible to delete specific row using delete query?
You can't have where clause for delete, how can you delete it ?? ( Do I need answer ????)
15.When do you want to create thread pool?
Never... (ahhhh....), Java by default creates it always...
Subscribe to:
Posts (Atom)