Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?
7 10987If your team member writes code with lots of static variables and static methods, will it cause any side effects?
KPIT,
3 7389If I have 1000 objects and my requirement is to sort them quickly, then which collection would you recommend and why?
KPIT,
5 8677I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do?
KPIT,
3 6721There is a Banking application. It has 2 types of account, Savings and Current. Write a method calculateInterest by passing an ArrayList of these account objects and calculate Interest accordingly. Write code for this situation
1 3438There are 2 methods in a class. Both have the same method signature except for return types. Is this overloading or overriding or what is it?
KPIT,
9 13400There are 2 classes, 1 LandAnimal and another WaterAnimal. There is another class Animal which wants to have the properties of both LandAnimal and WaterAnimal. How will you design this situation?
KPIT,
6 10530I have a String s = java; What is the output when I say s.replaceAll('j', 'k'); Also what is the value of s after replacing?
KPIT,
8 11454
What does int argc char * argv [] mean?
How to perform merge sort in java?
What is a class component?
What is set in java?
Can a class be defined inside an interface?
Differences between C and Java?
What is a lock or purpose of locks in java?
What is sizeof in java?
What is a finally block?
What is api in java?
What is backdrop?
Explain inner classes ?
What is a modifier?
Does treeset use compareto?
What does string intern() method do?