HowToDoInJava

  • Python
  • Java
  • Spring Boot
  • Dark Mode
Home / Interview / Real java interview questions asked for Oracle Enterprise Manager Project

Real java interview questions asked for Oracle Enterprise Manager Project

Oracle Enterprise Manager helps private and public cloud service providers deliver cloud services up to ten times faster while freeing up administration resources. It’s very popular product from Oracle.

Sreenath Ravva, one of reader on HowToDoInJava, has appeared on a interview for position in above product i.e. oracle enterprise manager. Below listed questions were shared with me by him so that I can share with all of you, in hope that it will benefit few of us on any fine day.

Note: I have tried to put links to webpages where you can refer for answers of below interview questions. They may not be enough to cover the topic, but they will give you start.

First round (Telephonic) java interview questions

1) Can you just start telling about your self and your project?

2) What is abstraction and encapsulation in java ?

– //howtodoinjava.com/object-oriented/understanding-abstraction-in-java/
– //howtodoinjava.com/object-oriented/encapsulation-in-java-and-its-relation-with-abstraction/

3) Method Overloading rules? Can we overload the super class method in sub class. Discussion happened with the example.

  1. //howtodoinjava.com/2013/07/15/what-is-polymorphism-in-java
  2. http://stackoverflow.com/questions/10901259/java-overloading-rules

4) Method Overriding rules?

http://docs.oracle.com/javase/tutorial/java/IandI/override.html

5) Widening and narrowing in java? Discussion happened with example?

http://stackoverflow.com/questions/16781649/real-world-application-of-widening-narrowing-conversion

6) Can I have only try block in code?

No. You need either catch block or finally block along with try block, at least. [Till Java 6]

As “Ievgen” mentioned in comments, JDK 7 onwards you can use try-with-resources with “optional” catch or finally block.

try (FileInputStream f = new FileInputStream("ttt")) 
		{
			System.out.println("t");
		}

7) Threads : producer and consumer problem?

  • http://en.wikipedia.org/wiki/Producer-consumer_problem
  • //howtodoinjava.com/java-5/how-to-use-blockingqueue-and-threadpoolexecutor-in-java/

8) Why wait(), notify() and notifyAll() are defined in Object class?

  • //howtodoinjava.com/2013/03/04/core-java-interview-questions-series-part-2/
  • http://stackoverflow.com/questions/17840397/concept-behind-putting-wait-notify-methods-in-object-class

9) Can we override wait() or notify() methods?

In Object.java, methods getClass(), notify(), notifyAll() and three wait() methods are final, so you can’t override them.

10) Difference between wait(), sleep() and yield()?

http://stackoverflow.com/questions/9700871/what-is-difference-between-sleep-method-and-yield-method-of-multi-threading

11) Explain about join() method in thread class

http://stackoverflow.com/questions/18479771/java-multithreading-concept-and-join-method

Second round (Face to face) java interview questions

1) Can you just start telling about your self and your project?

Refer to first question in above list.

2) Have you faced out of memory error? If yes how you fixed ? Tell different scenarios why it comes?

http://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-outofmemoryerror-java-heap-space-error-64mb-heap

3) Database connection leakage?

4) Write a program to swap two numbers with out using third variable?

import java.io.*;
public class SwappingNumberWithoutThirdVariable
{
    public static void main(String[] args)throws IOException
    {
        int a = 0 ,b = 1;

        System.out.println("a = "+a);
        System.out.println("b = "+b);

        //Beginning of Swapping
        a = a + b;
        b = a - b;
        a = a - b;
        //End of Swapping

        System.out.println("The numbers after swapping are");
        System.out.println("a = "+a);
        System.out.println("b = "+b);
    }
}

5) Write a program to sort an array and remove duplicates?

http://stackoverflow.com/questions/17967114/how-to-remove-duplicates-from-an-array-in-java

6) Write a program on Singleton?

//howtodoinjava.com/design-patterns/singleton-design-pattern-in-java/

7) I have two arrays which contains integer. Write a program to merge those two arrays and remove duplicate elements? At the end, I need one array which should have unique elements?

http://stackoverflow.com/questions/5057156/merging-lists-into-a-single-array-with-unique-elements

8) Write a program to fetch the data from a table using JDBC and result set?

//howtodoinjava.com/2013/11/24/jdbc-select-query-example/

9) How to get data from HashMap?

//howtodoinjava.com/java/interviews-questions/how-hashmap-works-in-java/

10) Difference between Vector and ArrayList?

//howtodoinjava.com/java/collections/useful-java-collection-interview-questions/

11) Difference between sleep and wait?

//howtodoinjava.com/2013/03/08/difference-between-sleep-and-wait/

12) Also asked some sql queries.

Practice yourself.

13) Write a program to print Fibonacci series?

public class FibonacciSampleCode
{
    public static void main(String[] args) 
    {
        FibonacciSampleCode fs = new FibonacciSampleCode();
        fs.fibonacci(); 
    }
    public void fibonacci() 
    {
        int numb1 = 1;
        int numb2 = 1;
        int temp = 0;

        
        Scanner input=new Scanner(System.in);
        System.out.println("How Many Terms? (Up To 45)");
        int x=input.nextInt();
        x=x-2;

        System.out.println(numb1);
        System.out.println(numb2);

        for (int i = 0; i < x; i++) 
        {
            System.out.println(numb1 + numb2 + " ");
            temp = numb1;
            numb1 = numb2;
            numb2 = temp + numb2;
        }
    }
}

14) Can we write try catch block like below code?

try
{
	try
	{
	}
}
catch()
{
}

//howtodoinjava.com/2012/12/07/why-try-catch-finally-blocks-require-braces/

15) What is the use of finally block?

http://stackoverflow.com/questions/15768645/what-is-the-benefit-to-use-finally-after-try-catch-block-in-java

16) What is the use of final keyword?

http://en.wikipedia.org/wiki/Final_%28Java%29

17) Can i declare class as static?

http://stackoverflow.com/questions/2376938/why-cant-a-java-class-be-declared-as-static

18) What is static method and static variable?

http://stackoverflow.com/questions/7815664/static-method-and-static-variable-java

19) Can I declare a class as private?

http://docs.oracle.com/javase/tutorial/java/javaOO/classdecl.html

20) What happens if i write return in try block? Will finally executes? What happens if write system.exit(), will finally block executes?

http://stackoverflow.com/questions/65035/does-finally-always-execute-in-java

21) Why you want to change the company?

http://www.linkedin.com/groups/How-do-you-answer-Why-1792709.S.54631120

Nobody expect you tell the truth.. ๐Ÿ™‚

That’s all interview questions he was able to recall when he wrote me mail regarding this. We hope that it will help some of us, who are planning our next interview with oracle.

Happy Learning!!

Was this post helpful?

Let us know if you liked the post. Thatโ€™s the only way we can improve.

Share this:

  • Twitter
  • Facebook
  • LinkedIn
  • Reddit

About Lokesh Gupta

A family guy with fun loving nature. Love computers, programming and solving everyday problems. Find me on Facebook and Twitter.

Feedback, Discussion and Comments

  1. pramod

    August 8, 2018

    Thanks a lot sir, i love reading your blog and You have explained every topic in a detail way.
    Sir, can you please post spring interview questions?

  2. asheesh

    April 16, 2016

    I am asked to write a generics code to add two number.using generics,when i tried,it can’t be perform any arithmetic operation on two generics type passed arguments in a method.
    For a possible solution if i will check instance of on passed arguments,then perform arithmetic operation,then what will be the generic output type in that case.
    Any guidance.
    something like below:

    class AddOp<T extends Number>{
    	public <T> T add(T e1,T e2){
    		if(e1 instanceof Integer){
    			return e1.intValue()+e2.intValue();
    			
    		}
    	}
    }
    
  3. SUnil Pingale

    March 26, 2016

    Very good side i have ever seen

    • Palak Dalal

      March 26, 2016

      Thanks sunil

  4. Parth Trivedi

    February 3, 2016

    Excellent. Thanks for sharing. This helps a lot. The questions are intelligent. It helped me a lot. Thank you.

  5. Venu Oruganti

    September 27, 2015

    Your site has very good information and very well presented. But when we are trying to read the page, every few seconds the page just scrolls to an advertisement and we lose track of the part we are reading. It is EXTREMELY annoying and to be honest outright insulting. I know you would like some ad revenue, but why can’t you display the ads on the side?

    • Lokesh Gupta

      September 28, 2015

      Hi Venu, Thanks for the feedback. I am using adsense and developermedia for ads. Both are reputed and trustworthy. It is perhaps any rouge ad from any advertiser. Please send me screenshot whenever you face such behavior, i will block that ad. Thanks again for your patience.

  6. shravan

    March 25, 2015

    superb boss keep happy learning and happy teaching…………………..

  7. Ievgen

    March 16, 2015

    Can I have only try block in code?
    No. You need either catch block or finally block along with try block, at least.

    It’s false. Because there is try-with-resources in java 7.

    try(FileInputStream f = new FileInputStream("ttt")){
         System.out.println("t");
    }
    

    it works ok

    • Lokesh Gupta

      March 17, 2015

      Thanks for your valuable comment. I will update the post.

  8. Maks

    December 10, 2014

    Thanks a lot.
    As usual one more great article from you.
    I love yours blog, I guess i could find here almost everything ๐Ÿ™‚

  9. sahi

    July 14, 2014

    nice .thank you

  10. padhi

    July 12, 2014

    hi Lokesh..for an 7+ yrs. Exp. Java resource..what would be the topics that needs to be concentrated on while preparing for an interview…

  11. karan shergill

    June 9, 2014

    thnx sir for this lovely article keep posting more

  12. Adarsha

    June 6, 2014

    Please share testing and Spring Interview questions.

    • Lokesh Gupta

      June 6, 2014

      Testing is not my forte. Spring interview questions are in my TODO list already.

  13. Adarsh S

    April 21, 2014

    Its very usefull … Please share spring questions also..

    • Lokesh Gupta

      April 21, 2014

      I will soon ask my readers for their experience in spring interview questions, and consolidate them.

  14. subbareddy

    April 19, 2014

    thnk u for given these questions and can u post questions on spring also………..

  15. Suren

    April 18, 2014

    Excellent. Thanks for putting together and sharing.

  16. ravi

    April 18, 2014

    thanks

Comments are closed on this article!

Search Tutorials

Interview Questions

  • Java Interview Questions List
  • Java Puzzles List
  • Java String Interview Questions
  • Core Java Interview Questions – 1
  • Core Java Interview Questions – 2
  • Core Java Interview Questions – 3
  • Collection Interview Questions
  • Spring Interview Questions
  • Spring AOP Interview Questions
  • Spring Boot Interview Questions
  • Spring MVC Interview Questions
  • Mid-level Developer Interview
  • Oracle Interview Questions
  • HashMap Interview Questions

Meta Links

  • About Me
  • Contact Us
  • Privacy policy
  • Advertise
  • Guest and Sponsored Posts

Recommended Reading

  • 10 Life Lessons
  • Secure Hash Algorithms
  • How Web Servers work?
  • How Java I/O Works Internally?
  • Best Way to Learn Java
  • Java Best Practices Guide
  • Microservices Tutorial
  • REST API Tutorial
  • How to Start New Blog

Copyright © 2020 · HowToDoInjava.com · All Rights Reserved. | Sitemap

  • Java 15 New Features
  • Sealed Classes and Interfaces
  • EdDSA (Ed25519 / Ed448)