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 8958
Why to give the file name same as the public class name in java?3 5740
If your team member writes code with lots of static variables and static methods, will it cause any side effects?
If I have 1000 objects and my requirement is to sort them quickly, then which collection would you recommend and why?
I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do?
There 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 situation1 2577
There 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?
There 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?
I 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?
Is array a class in java?
What is the purpose of using java.lang.class class?
What is an exception in java?
Is 0 true or false in java?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
Where is the singleton class used?
What do you mean by Hash Map and Hash Table?
If system.exit (0); is written at the end of the try block, will the finally block still execute?
Can a string be null?
Can we create our own daemon thread?
How to connect to a remote database using Applet?
Where is singleton pattern used?
What is the instance of an object?
What does it mean to flush a file?
What is the new line character?