-
-
-
Should i override Equals and hasCode methods while implementing Comparable interface??
somewhere I read we should override equals() and hasCode() methods while implementing Comparable interface... I could not understand why should i do so... Kindly help.. thx in advance.
-
Java command line arguments
What is the difference between java command line arguments and C command line arguments?
-
-
-
-
-
-
Mystique Function
Today we have a special function called Mystique Function.Mystique function for any value x is denoted by H(x). H(x) is defined as the count of positive integers such that (Let k be one of such positive integer)
1) x%k=0
2) for every integer z it satisfies (z^k-z)%k=0.
3) k>1
Now given a value x you need to print the sum of H(2)+H(3)+H(4)..H(x). -
-
Sub Class method call
When the Subclass method is called, does the SuperClass constructor execute? If so, which Constructor executes first (Sub Class OR Super Class) for the given below scenarios?
a. Given that we are NOT inheriting SuperClass constructor?
b. Given that we are inheriting SuperClass constructor? -
-
-
-
Why java is not 100% object oriented language??
i have not ..asked in TCS interview ..if any one have plz answer me on er.anuj.mittal@gmail.com
-
String Format Expression
In the expression String.format("%2d", 5)
what are the things below, be specific. for example, if the thing is an operator, indicate whether it is binary/unary and whether it is arithmetic/logical/relational. If it is a method, indicate whether its static or not
a. String
b. .
c. format()
d. "%2d" and 5 -
What is the difference between inheritance and extends?
I have not mistaken extends for polymorphism or encapsulation or anything else.. my question is correct!!!
-
-
What is difference between array & arraylist?
Arraylist is resizable where as using array it is not possible.
Core Java Interview Questions
Ans