![]() ![]() ![]() Practically, you can replace a class with its subclass and Java’s inheritance mechanism follows this principle. Liskov’s Substitution Principle prescribes that you can replace an object with an instance of its subtype without corrupting the program. Can you override a private method in Java? What’s the difference between CountDownLatch and CyclicBarrier? Why to use PreparedStatement over Statement? Distinguish between throw and throws in Java What do System.gc() and Runtime.gc() methods do? Can you store null keys/ values and duplicate keys/values in a Java HashMap? What’s the difference between fail-fast and fail-safe? Is Java pass-by-reference or pass-by-value? How can you ensure that N threads can access N resources without deadlock? Will finally block execute if you put System.exit () in catch or try block? Why does Java not support multiple inheritances? In OOP, how does abstraction differ from encapsulation? We hope that it will help some of us, who are planning our next interview with oracle. That’s all interview questions he was able to recall when he wrote me a mail regarding this. What happens if i write return in try block? Will finally executes? What happens if write system.exit(), will finally block executes? What is static method and static variable? /7/why-try-catch-finally-blocks-require-braces/ 15. Can we write try catch block like below code? Write a program to print Fibonacci series? public class FibonacciSampleCodeįibonacciSampleCode fs = new FibonacciSampleCode() /8/difference-between-sleep-and-wait/ 12. /java/collections/useful-java-collection-interview-questions/ 11. /java/interviews-questions/how-hashmap-works-in-java/ 10. Write a program to fetch the data from a table using JDBC and result set? Write a program to merge those two arrays and remove duplicate elements? At the end, I need one array which should have unique elements? I have two arrays which contains integer. /design-patterns/singleton-design-pattern-in-java/ 7. Write a program to sort an array and remove duplicates? ![]() Public static void main(String args)throws IOException Public class SwappingNumberWithoutThirdVariable Write a program to swap two numbers with out using third variable? import java.io.* Have you faced out of memory error? If yes how you fixed ? Tell different scenarios why it comes? Can you just start telling about yourself and your project? Explain about join() method in thread classĢ. Difference between wait(), sleep() and yield()? In Object.java, methods getClass(), notify(), notifyAll() and three wait() methods are final, so you can’t override them. Can we override wait() or notify() methods?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |