🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 针对 Oracle 企业管理器项目的实际 Java 面试问题 > 原文: [https://howtodoinjava.com/interview-questions/real-java-interview-questions-asked-for-oracle-enterprise-manager-project/](https://howtodoinjava.com/interview-questions/real-java-interview-questions-asked-for-oracle-enterprise-manager-project/) [Oracle 企业管理器](https://www.oracle.com/technetwork/oem/enterprise-manager/overview/index.html "oracle enterprise manager")可帮助私有和公共云服务提供商在释放管理资源的同时,将云服务的速度提高十倍。 这是来自 Oracle 的非常受欢迎的产品。 *HowToDoInJava* 的读者之一,**Sreenath Ravva**,出现在上述产品(即 oracle 企业管理器)职位的采访中。 他与我分享了以下列出的问题,以便我可以与大家分享,希望在任何美好的一天中对我们中的几个人都没有好处。 注意:我已尝试在网页上放置链接,以供您参考以下面试问题的答案。 它们可能不足以涵盖该主题,但是它们可以帮助您入门。 ## 第一轮(电话)java 面试题 **1)您可以开始讲述自己和您的项目吗?** <https://www.youtube.com/embed/CumOvDWnUDY?feature=oembed> **2)什么是 Java 中的抽象和封装?** – [https://howtodoinjava.com/object-oriented/understanding-abstraction-in-java/](//howtodoinjava.com/object-oriented/understanding-abstraction-in-java/) – [https://howtodoinjava.com/object-oriented/encapsulation-in-java-and-its-relation-with-abstraction/](//howtodoinjava.com/object-oriented/encapsulation-in-java-and-its-relation-with-abstraction/) **3)方法重载规则? 我们可以在子类中重载超类方法吗? 该示例进行了讨论。** 1. [https://howtodoinjava.com/2013/07/15/what-is-polymorphism-in-java](//howtodoinjava.com/object-oriented/what-is-polymorphism-in-java/) 2. [http://stackoverflow.com/questions/10901259/java-overloading-rules](https://stackoverflow.com/questions/10901259/java-overloading-rules) **4)方法覆盖规则?** [http://docs.oracle.com/javase/tutorial/java/IandI/override.html]( http://docs.oracle.com/javase/tutorial/java/IandI/override.html) **5)Java 中的扩大和缩小? 讨论发生在例子上吗?** [http://stackoverflow.com/questions/16781649/real-world-application-of-widening-narrowing-conversion](https://stackoverflow.com/questions/16781649/real-world-application-of-widening-narrowing-conversion) **6)我在代码中可以只有`try`块吗?** 不。您至少需要`catch`块或`finally`块以及`try`块。(直到 Java 6) 如“Ievgen”在评论中提到的,从 JDK 7 开始,您可以使用[`try-with-resources`](//howtodoinjava.com/java-7/automatic-resource-management-with-try-with-resources-in-java-7/)带有“可选的”`catch`或`finally`块。 ```java try (FileInputStream f = new FileInputStream("ttt")) { System.out.println("t"); } ``` **7)线程:生产者和消费者的问题?** * [http://en.wikipedia.org/wiki/Producer-consumer_problem](https://en.wikipedia.org/wiki/Producer-consumer_problem) * [http://howtodoinjava.com/java-5/how-to-use-blockingqueue-and-threadpoolexecutor-in-java/](//howtodoinjava.com/java-5/how-to-use-blockingqueue-and-threadpoolexecutor-in-java/) **8)为什么在`Object`类中定义了`wait()`,`notify()`和`notifyAll()`?** * [http://howtodoinjava.com/2013/03/04/core-java-interview-questions-series-part-2/](//howtodoinjava.com/java/interviews-questions/core-java-interview-questions-series-part-2/) * [http://stackoverflow.com/questions/17840397/concept-behind-putting-wait-notify-methods-in-object-class](https://stackoverflow.com/questions/17840397/concept-behind-putting-wait-notify-methods-in-object-class) **9)我们可以覆盖`wait()`或`notify()`方法吗?** 在`Object.java`中,方法`getClass()`,`notify()`,`notifyAll()`和三个`wait()`方法是最终的,因此您无法覆盖它们。 **10)`wait()`,`sleep()`和`yield()`之间的区别?** [http://stackoverflow.com/questions/9700871/what-is-difference-between-sleep-method-and-yield-method-of-multi-threading](https://stackoverflow.com/questions/9700871/what-is-difference-between-sleep-method-and-yield-method-of-multi-threading) **11)解释线程类中的`join()`方法** [http://stackoverflow.com/questions/18479771/java-multithreading-concept-and-join-method](https://stackoverflow.com/questions/18479771/java-multithreading-concept-and-join-method) ## 第二轮(面对面)java 面试题 **1) 您可以开始讲述自己和您的项目吗?** *请参阅上面列表中的第一个问题。* **2)您是否遇到内存不足错误? 如果是,您如何解决? 告诉不同的情况为什么会这样?** [http://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-outofmemoryerror-java-heap-space-error-64mb-heap](https://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-outofmemoryerror-java-heap-space-error-64mb-heap) **3)数据库连接泄漏?** [http://blogs.msdn.com/b/snehadeep/archive/2009/04/28/connection-leak-its-symptoms-and-troubleshooting.aspx](https://blogs.msdn.com/b/snehadeep/archive/2009/04/28/connection-leak-its-symptoms-and-troubleshooting.aspx) **4)编写一个程序,使用第三个变量将两个数字互换?** ```java 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)编写程序以对数组进行排序并删除重复项?** [http://stackoverflow.com/questions/17967114/how-to-remove-dumoments-from-an-array-in-java](https://stackoverflow.com/questions/17967114/how-to-remove-duplicates-from-an-array-in-java) **6)在单例上编写程序?** [https://howtodoinjava.com/design-patterns/singleton-design-pattern-in-java/](//howtodoinjava.com/design-patterns/singleton-design-pattern-in-java/) **7)我有两个包含整数的数组。 编写一个程序来合并这两个数组并删除重复的元素? 最后,我需要一个应该具有唯一元素的数组?** [http://stackoverflow.com/questions/5057156/merging-lists-into-a-single-array-with-unique-elements](https://stackoverflow.com/questions/5057156/merging-lists-into-a-single-array-with-unique-elements) **8)编写程序以使用 JDBC 和结果集从表中获取数据?** [https://howtodoinjava.com/2013/11/24/jdbc-select-query-example/](//howtodoinjava.com/misc/jdbc-select-query-example/) **9)如何从`HashMap`获取数据?** [https://howtodoinjava.com/java/interviews-questions/how-hashmap-works-in-java/](//howtodoinjava.com/java/collections/how-hashmap-works-in-java/) **10)`Vector`和`ArrayList`之间的区别?** <https://howtodoinjava.com/java/collections/useful-java-collection-interview-questions/> **11)睡眠和等待之间的区别?** [https://howtodoinjava.com/2013/03/08/difference-between-sleep-and-wait/](//howtodoinjava.com/java/multi-threading/difference-between-sleep-and-wait/) **12)还问了一些 sql 查询。** 练习一下。 **13)编写程序来打印斐波那契数列?** ```java 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)我们可以像下面的代码一样编写`try catch`块吗?** ```java try { try { } } catch() { } ``` [https://howtodoinjava.com/2012/12/why-try-catch-finally-blocks-require-braces/](//howtodoinjava.com/for-fun-only/why-try-catch-finally-blocks-require-braces/) **15)`finally`块有什么用?** [http://stackoverflow.com/questions/15768645/what-is-the-benefit-to-use-finally-after-try-catch-block-in-java](https://stackoverflow.com/questions/15768645/what-is-the-benefit-to-use-finally-after-try-catch-block-in-java) **16)`final`关键字有什么用?** [http://en.wikipedia.org/wiki/Final_%28Java%29](https://en.wikipedia.org/wiki/Final_%28Java%29) **17)我可以将类声明为静态吗?** [http://stackoverflow.com/questions/2376938/why-cant-a-java-class-be-de-clared-as-static](https://stackoverflow.com/questions/2376938/why-cant-a-java-class-be-declared-as-static) **18)什么是静态方法和静态变量?** [http://stackoverflow.com/questions/7815664/static-method-and-static-variable-java](https://stackoverflow.com/questions/7815664/static-method-and-static-variable-java) **19)我可以将一个类声明为私有类吗?** [http://docs.oracle.com/javase/tutorial/java/javaOO/classdecl.html](https://docs.oracle.com/javase/tutorial/java/javaOO/classdecl.html) **20)如果我在`try`块中写`return`会发生什么? `finally`会执行吗? 如果写入`system.exit()`,`finally`块会怎样?** [http://stackoverflow.com/questions/65035/does-finally-always-execute-in-java](https://stackoverflow.com/questions/65035/does-finally-always-execute-in-java) **21)为什么要更改公司?** [http://www.linkedin.com/groups/How-do-you-answer-Why-1792709.S.54631120](https://www.linkedin.com/groups/How-do-you-answer-Why-1792709.S.54631120 ) 没有人期望你说实话...🙂 这是他在写给我有关此问题的邮件时回想的所有**面试问题**。 我们希望这会对计划下一次与 oracle 进行面试的我们某些人有所帮助。 **祝您学习愉快!**