精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (4)
|
|
---|---|
作者 | 正文 |
发表时间:2010-05-12
最后修改:2010-05-12
答案参考链接:
http://www.allapplabs.com/interview_questions/java_interview_questions_7.htm 第一页 Question: What is the difference between an Interface and an Abstract class?(接口和对象的区别) Question: What is the purpose of garbage collection in Java, and when is it used?(什么是Java的垃圾回收,什么时候将会用到(执行)它) Question: Describe synchronization in respect to multithreading.(描述一下多线程中的同步) Question: Explain different way of using thread? (解释使用(实现)thred的不同方法) Question: What are pass by reference and pass by value?(什么是引用传递和值传递) Question: What is HashMap and Map?(什么是HashMap和Map) Question: Difference between HashMap and HashTable?(什么是HashMap和HashTable的区别) Question: Difference between Vector and ArrayList?(Vector和Arraylist的区别) Question: Difference between Swing and Awt?(Swing和Awt的区别(很少问这个问题吧?)) Question: What is the difference between a constructor and a method?(构造函数和方法的区别) Question: What is an Iterator?(什么是Iterator) Question: State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers.(逐一陈述一下public,private,protected,default(friendly)的意义(太难翻译了,后面的省略了)) Question: What is an abstract class?(什么是抽象类) Question: What is static in java?(什么是static) Question: What is final? (什么是final) 第二页 Question: What if the main method is declared as private? Question: What if the static modifier is removed from the signature of the main method? Question: What if I write static public void instead of public static void? Question: What if I do not provide the String array as the argument to the method? Question: What is the first argument of the String array in main method? Question: If I do not provide any arguments on the command line, then the String array of Main method will be empty or null? Question: How can one prove that the array is not null but empty using one line of code? Question: What environment variables do I need to set on my machine in order to be able to run Java programs? Question: Can an application have multiple classes having main method? Question: Can I have multiple main methods in the same class? Question: Do I need to import java.lang package any time? Why ? Question: Can I import same package/class twice? Will the JVM load the package twice at runtime? Question: What are Checked and UnChecked Exception? Question: What is Overriding? Question: What are different types of inner classes? 第三页 Question: Are the imports checked for validity at compile time? e.g. will the code containing an import such as java.lang.ABCD compile? Question: Does importing a package imports the subpackages as well? e.g. Does importing com.MyTest.* also import com.MyTest.UnitTests.*? Question: What is the difference between declaring a variable and defining a variable? Question: What is the default value of an object reference declared as an instance variable? Question: Can a top level class be private or protected? Question: What type of parameter passing does Java support? Question: Primitive data types are passed by reference or pass by value? Question: Objects are passed by value or by reference? Question: What is serialization? Question: How do I serialize an object to a file? Question: Which methods of Serializable interface should I implement? Question: How can I customize the seralization process? i.e. how can one have a control over the serialization process? Question: What is the common usage of serialization? Question: What is Externalizable interface? Question: When you serialize an object, what happens to the object references included in the object? Question: What one should take care of while serializing the object? Question: What happens to the static fields of a class during serialization? 第四页 Question: Does Java provide any construct to find out the size of an object? Question: Give a simplest way to find out the time a method takes for execution without using any profiling tool? Question: What are wrapper classes? Question: Why do we need wrapper classes? Question: What are checked exceptions? Question: What are runtime exceptions? Question: What is the difference between error and an exception?? Question: How to create custom exceptions? Question: If I want an object of my class to be thrown as an exception object, what should I do? Question: If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object? Question: How does an exception permeate through the code? Question: What are the different ways to handle exceptions? Question: What is the basic difference between the 2 approaches to exception handling...1> try catch block and 2> specifying the candidate exceptions in the throws clause? When should you use which approach? Question: Is it necessary that each try block must be followed by a catch block? Question: If I write return at the end of the try block, will the finally block still execute? Question: If I write System.exit (0); at the end of the try block, will the finally block still execute? 第五页 Question: How are Observer and Observable used? Question: What is synchronization and why is it important? Question: How does Java handle integer overflows and underflows? Question: Does garbage collection guarantee that a program will not run out of memory? Question: What is the difference between preemptive scheduling and time slicing? Question: When a thread is created and started, what is its initial state? Question: What is the purpose of finalization? Question: What is the Locale class? Question: What is the difference between a while statement and a do statement? Question: What is the difference between static and non-static variables? Question: How are this() and super() used with constructors? Question: What are synchronized methods and synchronized statements? Question: What is daemon thread and which method is used to create the daemon thread? Question: Can applets communicate with each other? Question: What are the steps in the JDBC connection? Question: How does a try statement determine which catch clause should be used to handle an exception? 第六页 Question: Can an unreachable object become reachable again? Question: What method must be implemented by all threads? Question: What are synchronized methods and synchronized statements? Question: What is Externalizable? Question: What modifiers are allowed for methods in an Interface? Question: What are some alternatives to inheritance? Question: What does it mean that a method or field is "static"? ? Question: What is the difference between preemptive scheduling and time slicing? Question: What is the catch or declare rule for method declarations? 第七页 Question: Is Empty .java file a valid source file? Question: Can a .java file contain more than one java classes? Question: Is String a primitive data type in Java? Question: Is main a keyword in Java? Question: Is next a keyword in Java? Question: Is delete a keyword in Java? Question: Is exit a keyword in Java? Question: What happens if you dont initialize an instance variable of any of the primitive types in Java? Question: What will be the initial value of an object reference which is defined as an instance variable? Question: What are the different scopes for Java variables? Question: What is the default value of the local variables? Question: How many objects are created in the following piece of code? MyClass c1, c2, c3; c1 = new MyClass (); c3 = new MyClass (); Question: Can a public class MyClass be defined in a source file named YourClass.java? Question: Can main method be declared final? Question: What will be the output of the following statement? System.out.println ("1" + 3); Question: What will be the default values of all the elements of an array defined as an instance variable? 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2010-05-12
老外面试题 跟中文版 面试大全中很多题目一致
|
|
返回顶楼 | |
发表时间:2010-05-12
你网上搜搜都应该有答案 我估计没人帮你翻译这个 嫩么多字了
|
|
返回顶楼 | |
发表时间:2010-05-12
最后修改:2010-05-12
不就是把普通面试题变成E文了,看不懂这几年英语就算是白学了
|
|
返回顶楼 | |
发表时间:2010-05-12
whaosoft 写道 你网上搜搜都应该有答案 我估计没人帮你翻译这个 嫩么多字了 我是放在这儿供自己慢慢学习翻译。
|
|
返回顶楼 | |
发表时间:2010-05-12
君淋天下 写道 老外面试题 跟中文版 面试大全中很多题目一致
我从来都没被老外面过。期待。 |
|
返回顶楼 | |
发表时间:2010-05-12
第一页
问题:接口和抽象类有什么区别 问题:gc在Java中的作用是什么,什么时候用到 问题:根据多线程来谈谈同步 问题:讲讲有什么不同的方法来用多线程 问题:什么通过值传递,什么通过引用传递。 问题:什么是HashMap,什么是Map 问题:HashMap和HashTable的区别 问题:Vector和ArrayList的区别 问题:Swing和AWT的区别 问题:构造函数和方法的区别 问题:什么是Iterator 问题:陈述public, private, protected, default标识符的作用(不理解这几个东西怎么in combination.)并描述一下使用以上标识符在包之间的影响。 问题:什么是抽象类 问题:在java中什么是static 问题:什么是final 第二页 问题:如果将main函数声明为private会怎样 问题:如果将main函数的static标识符去掉会怎样 问题:用static public void待地public static void会怎样 问题:如果不用string数组作参数会怎么样 问题:如果我在命令行中什么都不输入,那么main函数的string数组是空的还是null 问题:如何用一行代码来证明数组不是null而是空的 问题:为了运行Java程序,我需要在我的电脑上设置什么环境变量 问题:一个程序可以在拥有main函数的同时有多个类吗 问题:我可以在一个类里有多个main函数吗 问题:我需要在任何时候都导入java.lang包吗,为什么 问题:我可以导入相同的包/类两次吗?JVM会在运行时载入包两次? 问题:什么是可控和不可控的异常? 问题:什么是重写? 问题:内部类有什么不同的类型? 第三页 问题:import的包会在编译的时候检查合法性吗?例如,包含了引入java.lang.ABCD的代码会被编译? 问题:导入包的时候也会将包的子目录导入?例如导入com.MyTest.*也会导入 com.MyTest.UnitTests.*? 问题:声明和实例化一个变量的区别是什么 问题:声明为实例变量的对象的引用的默认值是什么 问题:顶级的类可以是private或protected吗 问题:Java支持什么类型的参数传递? 问题:原始类型变量是引用传递还是值传递? 问题:对象是值传递还是引用传递 问题:什么是序列化 问题:我如何将一个对象序列化到一个文件 问题:应该实现Serializable接口中的哪个方法 问题:我如何自定义序列化的过程?例如,如果控制序列化的进程。 问题:序列化的通用方法是什么 问题:什么是Externalizable接口 问题:当你序列化一个对象时,对象的引用和对象会发生什么事情? 问题:当序列化对象的时候,需要注意什么? 问题:在序列化的时候,一个类的static域会发生什么事情? 第四页 问题:Java提供过任何结构来查找一个对象的大小吗? 问题:不用任何分析工具,用最简单的方法找到方法的运行时间 问题:什么是包装类 问题:我们为什么需要包装类? 问题:什么是可控异常? 问题:什么是运行时异常? 问题:error和exception的区别是什么? 问题:如何自定义异常? 问题:如果我想让我的类将一个对象当成异常抛出,我该怎么做? 问题:如果我的类已经继承了其他的类,如果我想让我的类的一个实例作为异常对象抛出,我该怎么做? 问题:异常是如何渗入代码的?(想不好怎么翻译了呢) 问题:有什么不同的方法处理异常? 问题:两种异常处理方法有什么基本区别?1>try catch块 2>在throws语句中指定异常 问题:每一个try代码块有必要跟着一个catch代码块吗? 问题:如果我在try的结尾写了一个return,finally代码块还会被执行吗? 问题:如果我在try的结尾写了System.exit (0); finally代码块还会执行吗? 第五页 问题:Observer和Observable如何使用? 问题:什么是同步,为什么它重要? 问题:Java如何处理整型溢出和下溢? 问题:gc可以保证程序不会内存溢出吗? 问题:preemptive scheduling和time slicing有什么区别?(还真没听过,老老实实的放这吧) 问题:当一个线程被创建并运行的时候,它的初始状态是什么? 问题:finalization的目的是什么? 问题:什么是Locale类? 问题:while语句和do语句的区别是什么? 问题:静态变量和非静态变量的区别是什么? 问题:在构造函数中用是如何用this()和super()的 问题:什么是同步方法和同步语句? 问题:什么是daemon线程,那个方法用于创建daemon线程? 问题:applet之间可以相互联系吗? 问题:JDBC连接的步骤是什么? 问题:try语句是如何决定哪个catch语句来处理异常的? 刚才等同事来着,闲的真是没事干了,翻译了一部分,虽然都比较简单,但是有的还真没见过。。。剩下的不管了,回家咯!下班! |
|
返回顶楼 | |
发表时间:2010-05-13
很久以前流行,现在不怎么用了。
大公司基本采用在线测试.... |
|
返回顶楼 | |
发表时间:2010-05-13
留个脚印先
|
|
返回顶楼 | |
发表时间:2010-05-13
不懂英格力诗
|
|
返回顶楼 | |