java核心面试_Java核心面试问答

java核心面试

Here are 50+ commonly asked core Java interview questions and answers which will definitely help you out to crack one of the toughest interviews.

这里有50多个常见的Java核心访谈问题和答案,这些绝对可以帮助您攻克最艰难的访谈之一。

1. What is JVM? JVM stands for Java Virtual Machine and it makes Java a Portable and a Platform Independent Language. JVM is called Virtual as it is an Abstract System that executes Compiled Java Programs. JVM executes the Java ByteCode File or .class file.

1.什么是JVM? JVM代表Java虚拟机,它使Java成为可移植和独立于平台的语言。 JVM之所以称为“虚拟”,是因为它是一个执行已编译Java程序的抽象系统。 JVM执行Java ByteCode文件或.class文件。

2. Enlist Different Packages of Swings. The different Packages of Swings are as follows: 1. javax.swing: Provides a set of Light-weight Java Language Components. 2. javax.swing.plaf: Provides One interface and Many abstract classes to provide look-and-feel capabilities. 3. javax.swing.plaf.multi: Provides User Interface Objects built for Multi Platform Look and Feel. 4. javax.swing.event: Provides Events Fired by Swing Components. 5. javax.swing.tree: Provides Classes and Interfaces for dealing with javax.awt.swing.JTree 6. javax.swing.undo: Provides support for Undo/Redo Capabilities in Text Editor Applications.

2.申请不同的Swing包。 不同的Swing软件包如下: 1. javax.swing:提供一组轻量级Java语言组件。 2. javax.swing.plaf:提供一个接口和许多抽象类以提供外观功能。 3. javax.swing.plaf.multi:提供为多平台外观构建的用户界面对象。 4. javax.swing.event:提供由Swing组件触发的事件。 5. javax.swing.tree:提供用于处理javax.awt.swing.JTree的类和接口。6 . javax.swing.undo:提供对文本编辑器应用程序中撤消/重做功能的支持。

3. Enlist the difference between C++ and Java. 1. Java is a True Object Oriented Language whereas C++ supports both Object Oriented and Procedure Oriented paradigm. 2. Java does not support Operator Overloading whereas C++ supports it. 3. C++ contains Header Files whereas Java doesn’t contain header files. 4. Java supports Multi-Threading whereas C++ doesn’t support Multi-Threading. 5. Java does not support Pointers whereas C++ makes use of Pointers. 6. Java doesn’t supports Multiple Inheritance whereas C++ supports it.

3.找出C ++和Java之间的区别。 1. Java是一种真正的面向对象的语言,而C ++同时支持面向对象和面向过程的范例。 2. Java不支持运算符重载,而C ++支持。 3. C ++包含头文件,而Java不包含头文件。 4. Java支持多线程,而C ++不支持多线程。 5. Java不支持Pointers,而C ++使用Pointers。 6. Java不支持多重继承,而C ++支持。

4. Enlist Versions of Java. 1. Java Enterprise Edition(J2EE): Used to Develop Server-Side applications such as Java Servlets and Java Server Pages. 2. Java Micro Edition(J2ME): Used to develop applications for Mobile Devices such as Cell Phones, Tablets. 3. Java Standard Edition(J2SE): Develop Client Side Applets or Standalone Applications.

4.登记Java版本。 1. Java企业版(J2EE):用于开发服务器端应用程序,例如Java Servlet和Java Server Pages。 2. Java Micro Edition(J2ME):用于开发移动设备(如手机,平板电脑)的应用程序。 3. Java标准版(J2SE):开发客户端小程序或独立应用程序。

5. What is Object Oriented Programming Approach? Object Oriented Programming is an approach that provides a way of modularizing programs by creating partitioned memory area for data as well as functions that can be used as templates for creating copies of such modules on demand. OOP allows decomposition of a problem into a number of entities called Objects and then builds data and functions around these objects.

5.什么是面向对象的编程方法? 面向对象编程是一种方法,它通过创建数据的分区存储区以及可用作按需创建此类模块副本的模板的功能,来提供一种使程序模块化的方法。 OOP允许将问题分解成许多个称为Objects的实体,然后围绕这些对象构建数据和功能。

6. Explain Vector Class in Java. A Vector Class can be used to achieve a Generic Dynamic Array known as Vectors. Such Vector Class helps to store Objects of any quantity and Data Type. These Objects accessed into vector Class need not contain similar elements. Arrays are impemented as vectors. Vectors therefore, can be used to store a list of Objects that may differ in size.

6.解释Java中的Vector类。 向量类可用于实现称为向量的通用动态数组。 此类Vector类有助于存储任何数量和数据类型的对象。 这些访问向量类的对象不必包含类似的元素。 数组被强加为向量。 因此,向量可用于存储大小可能不同的对象列表。

7. What is jdb? It is the Java Debugger. Jdb basically helps you out to find Java Bugs. It is a Command Line Debugger Tool for Java Classes. It provides inspection and debugging of Local and Remote Java Virtual Machine.

7.什么是jdb? 它是Java调试器。 Jdb基本上可以帮助您查找Java Bug。 它是用于Java类的命令行调试器工具。 它提供了对本地和远程Java虚拟机的检查和调试。

8. What is AppletViewer? AppletViewer is a Java command line program to execute Java Applets. Its included in Java SDK. Java applet viewer helps to create Dynamic Applets as well as facilitates to view Java Applets.

8.什么是AppletViewer? AppletViewer是执行Java Applet的Java命令行程序。 它包含在Java SDK中。 Java Applet Viewer有助于创建动态Applet,并有助于查看Java Applet。

9. What is an Object? An Object is a Software Bundle of related State and Behaviour. Object is basically an instant of Class to which it belongs to. It is therefore possible to represent real world objects using Software Objects.

9.什么是对象? 对象是相关状态和行为的软件包。 对象基本上是它所属的Class的一个实例。 因此,可以使用软件对象来表示现实世界的对象。

10. What is Inheritance? Inheritance in Java is basically used by an Object to acquire the properties of another Object. Classes can therefore now be defined in terms of another previously defined Classes which thereby inherits the properties of previous Classes.

10.什么是继承? Java继承基本上由一个对象用来获取另一个对象的属性。 因此,现在可以根据另一个先前定义的类来定义类,从而可以继承以前的类的属性。

11. Enlist the Types of Errors in Java. The Types of Errors in Java are as follows:

11.登记Java中的错误类型。 Java中的错误类型如下:

Compile Time Errors This includes primarily Syntax Errors indicated by Java Compiler at Compile Time.

编译时错误 这主要包括Java编译器在编译时指示的语法错误。

Run Time Errors This includes primarily the Logical Errors that are not catched by the Java Compiler by may result into Abnormal Termination of the Program. It includes Divide by Zero Error, Opening a File that doesn’t exist, etc.

运行时错误 这主要包括Java编译器未捕获的逻辑错误,这些错误可能导致程序异常终止。 它包括除以零错误,打开不存在的文件等。

12. What is InstanceOf Operator? This operator is used to Reference Objects Variables. It tests if the first operand is an instance of its second. Its written as:

12.什么是InstanceOf运算符? 该运算符用于引用对象变量。 它测试第一个操作数是否是第二个操作数的实例。 其写为:

(Object Reference Variable) instanceOf (Class/ Interface Type)

(对象引用变量)instanceOf(类/接口类型)

13. Enlist Types of Constructors. Types of Constructors are:

13.征集构造函数的类型。 构造函数的类型为:

1. Default Constructor: This is a constructor without any parameters. A Default constructor is automatically created if you do not define any constructor for a Class.

1.默认构造函数:这是一个没有任何参数的构造函数。 如果未为类定义任何构造函数,则会自动创建一个Default构造函数。

2. Parameterized Constructor: A Constructor invoked with parameters is called a Parameterized constructor.

2.参数化构造函数:使用参数调用的构造函数称为参数化构造函数。

3. Overloading Constructor: Java allows Polymorphism i.e., a Method Overloading can be achieved by defining Two or more methods with the same name in a class.

3.重载构造函数:Java允许多态,即方法重载可以通过在类中定义两个或多个具有相同名称的方法来实现。

14. Explain Static Methods. Static methods in Java are used to create Methods or Functions that exists independent of Instances created for a Class. These methods doesn’t use any instance variables of any object of the class that they are defined in. Static methods can only access static data. They cannot call any other methods except Static Methods. Static Methods can not refer to This or Super Keywords.

14.说明静态方法。 Java中的静态方法用于创建独立于为类创建的实例而存在的方法或函数。 这些方法不使用定义它们的类的任何对象的任何实例变量。静态方法只能访问静态数据。 他们不能调用除静态方法之外的任何其他方法。 静态方法不能引用此关键字或超级关键字。

15. Explain this Keyword. There are times when a Function needs to refer to an Object that is invoked by it. This keyword facilitates reference to an Object within that particular methods. This keyword can be referenced to an object of current class type.

15.解释此关键字。 有时,某个功能需要引用由它调用的对象。 此关键字有助于在该特定方法中引用对象。 该关键字可以引用当前类类型的对象。

16. What is jar? Jar stands for Java Archive. It is a utility that combines several files into a Single jar file or expand a jar file. It is basically an extended version of zip file.

16.什么是罐子? Jar代表Java Archive。 它是一个实用程序,可将多个文件组合成单个jar文件或扩展jar文件。 它基本上是zip文件的扩展版本。

17. Enlist Types of Inheritance. Types of Inheritance supported in Java are as follows: 1. Single Inheritance 2. Hierarchical Inheritance 3. Multi-Level Inheritance 4. Multiple Inheritance

17.征用继承类型。 Java支持的继承类型如下: 1.单继承 2.层次继承 3.多级继承 4.多继承

18. What is awt in Java? AWT stands for Abstract Window Toolkit. It basically contains Widgets related to graphical User Interface designing that can be positioned using Layout Manager. AWT is platform independent. It provides Components, Containers and Layout Managers.

18. Java中的awt是什么? AWT代表“抽象窗口工具包”。 它基本上包含与图形用户界面设计相关的小部件,可以使用布局管理器进行定位。 AWT是独立于平台的。 它提供组件,容器和布局管理器。

19. Explain Subclass constructor in Java. A Subclass constructor is used to construct the instance variables of the Sub Class as well as the Super Class. A Sub Class can explicitly make a call to a Constructor of its very next Super Class. The Sub Class therefore, uses Super Keyword to invoke the Constructor methods of the Sub Class which results in execution of relevant constructor from Super Class based on the arguments passed to it.

19.用Java解释Subclass构造函数。 Subclass构造函数用于构造Sub Class和Super Class的实例变量。 子类可以显式调用其下一个超级类的构造函数。 因此,子类使用超级关键字来调用子类的构造方法,该方法将根据传递给它的参数从超级类执行相关的构造函数。

20. What is the use of Final Keyword? The value of a variable that has been declared as final cannot be changed later in the program. Java allows to declare a variable to be final irrespective of the Scope of the variable. Final int variable = 15; A Final local variable that has been declared but not initialised with any value is called as a Black Final.

20.最终关键字的用途是什么? 已声明为final的变量的值以后无法在程序中更改。 Java允许将变量声明为最终变量,而与变量的作用域无关。 最终的int变量= 15; 已声明但未使用任何值初始化的Final局部变量称为Black Final。

21. Enlist come common Java Built-In API Packages. The commonly used Packages in Java are as follows: Java.lang: It includes support for Threads, Strings, Exceptions and much more. java.util: Support for Date, Hash Tables, Vectors and others. Java.io: Input and Output support for Classes. Java.net: It provides support for Networking Java.applet: Support for creation of Applets.

21.登记使用常见的Java内置API软件包。 Java中常用的软件包如下: Java.lang:它包括对线程,字符串,异常等的支持。 java.util:支持日期,哈希表,向量等。 Java.io:对类的输入和输出支持。 Java.net:提供对网络的 支持Java.applet:支持创建Applet。

22. What is Polymorphism? Polymorphism is used to allow routines or methods to execute different behaviour in different instances. An operator or a Function can be made to react differently in different positions. In C, we have Asterisk * that by default makes use of Polymorphism. It works as a Multiply Operator as well as a Pointer or a De-Reference Operator automatically.

22.什么是多态? 多态性用于允许例程或方法在不同的实例中执行不同的行为。 可以使操作员或功能在不同位置做出不同React。 在C语言中,我们有Asterisk *,默认情况下会使用多态。 它可以自动用作乘法运算符以及指针或去参考运算符。

23. Explain InputStream Class in Java. An InputStream class is used to read 8-bit bytes that includes a Super Class known as InputStream and it also includes a number of Sub Classes that support Input related methods. It can perform actions like reading bytes, closing streams, marking positions in streams, skipping ahead in a stream and much more.

23.用Java解释InputStream类。 InputStream类用于读取8位字节,其中包括称为InputStream的超类,并且还包括许多支持与Input相关的方法的子类。 它可以执行诸如读取字节,关闭流,标记流中的位置,在流中向前跳过等更多操作。

24. Explain Final Classes in Java. A Class is declared as Final to avoid it from being Sub Classed. It therefore, helps to prevent the application of inheritance on that particular class. A Final Class is therefore a class that cannot be sub classed. If you try to extend the Classes from a Class declared as Final, a Compile Time Error will be generated.

24.用Java解释最终课程。 将一个类声明为Final,以避免其被子类化。 因此,它有助于防止在该特定类上应用继承。 因此,最终类是无法子类化的类。 如果尝试从声明为Final的类扩展类,则会生成“编译时错误”。

25. What is javah? javah is a utility to generate Source Files and Header Files required to implement Native Methods. These Header files are thus used for referencing an Object’s Instance variables from Native Source Codes.

25.什么是javah? javah是一个实用程序,用于生成实现本机方法所需的源文件和头文件。 因此,这些头文件用于从本机源代码引用对象的实例变量。

26. Explain Methods Overloading in Java? It is an application of Polymorphism. An overloaded method is the method that have the same name but number of arguments many differ or even the datatype may differ in some cases. Two methods that have the same name but different arguments or parameters within the same Class, it is known as Method overloading.

26.解释Java中的方法重载吗? 它是多态性的一种应用。 重载方法是具有相同名称的方法,但在某些情况下参数数量可能很多,甚至数据类型也可能不同。 具有相同名称但在同一Class中具有不同参数或参数的两个方法,称为方法重载。

27. Enlist Features of Swing. 1. Customization and Other Features: Change Border, Align Text, Custom Cursors, Dockable Toolbars, etc. 2.Large Set of Controls: Text Areas To display HTML or RTF, Trees, Tabbed Panes, Toolbars, Image Buttons 3. Look and Feel: It can modify the look and feel of the GUI at Runtime and you can even customize Design. 4. Lightweight: It is not built on Native Windows Based System.

27.获得Swing的功能。 1.自定义和其他功能:更改边框,对齐文本,自定义光标,可停靠工具栏等 。2 . 大型控件集:用于显示HTML或RTF的文本区域,树,选项卡式窗格,工具栏,图像按钮 3.外观:它可以在运行时修改GUI的外观,甚至可以自定义设计。 4.轻量级:它不是基于本机Windows构建的。

28. What is JDK? JDK stands for Software Development Kit and it includes Tools such as JVM Compiler, Debugger, Interpreter and few others to develop Java Applets and Applications.

28.什么是JDK? JDK代表软件开发套件,它包含诸如JVM编译器,调试器,解释器之类的工具,以及用于开发Java Applet和应用程序的少数其他工具。

29. Enlist Features of Java. 1. Distributed 2. Interpreted 3. Multi-Threaded 4. Platform Independent 5. Object Oriented 6. Portable

29.征集Java的功能。 1.分布式 2.解释 3.多线程 4.与平台无关 5.面向对象 6.便携式

30. Explain Method Overriding in Java? If a Class inherits a Method from its Upper Class, there are chances that it can make the Method Over Riding successful. However, that method must not be declared with final keyword. Function overriding basically means to override the functionality and capability of any existing method with a new type of operation.

30.解释Java中的方法重写? 如果一个类从其上层类继承一个方法,则它有可能使“乘骑方法”成功。 但是,该方法一定不能用final关键字声明。 函数覆盖基本上意味着用一种新型的操作来覆盖任何现有方法的功能。

31. What is StringBuffer Class used for? A StringBuffer Class is included in String Class. Normal String creates Strings of Fixed Length characters whereas StringBuffer Class helps in creating Strings of Flexible Length that has the capability to modify according to Content and Length. Hence, StringBuffer Class is memory efficient compared to String Class.

31. StringBuffer类的用途是什么? StringBuffer类包含在String Class中。 普通字符串创建固定长度的字符串,而StringBuffer类帮助创建具有可变长度的字符串,该字符串具有根据内容和长度进行修改的能力。 因此,与String类相比,StringBuffer类具有更高的内存效率。

32. Enlist Applet Life Cycle Methods. The common methods used in an Applet Life Cycle are: 1. init(): This method is invoked to initialize an applet. 2. start(): This method is basically called after init() and is basically used to load the Applet into the System. 3. stop(): This method is invoked by the Web Browser itself and indicates that the applet is not in use now. 4. destroy(): This method is invoked when the Browser is closed.

32.使用Applet生命周期方法。 Applet生命周期中使用的常见方法是: 1. init():调用此方法以初始化applet。 2. start():该方法基本上在init()之后调用,并且基本上用于将Applet加载到系统中。 3. stop():此方法由Web浏览器本身调用,并指示该小应用程序现在未使用。 4. destroy():关闭浏览器时调用此方法。

33. What are Wrapper Classes? Wrappers are Objects that are used to add them to a collection because Primitive Datatypes cannot be added directly. The Java.lang package provides standard library classes that are closely related to Primitive Datatypes and these are known as Wrappers. Wrappers are Byte, Integer, Short, Long, Character, Boolean, Double and Float.

33.什么是包装器类? 包装器是用于将它们添加到集合中的对象,因为不能直接添加原始数据类型。 Java.lang包提供了与原始数据类型密切相关的标准库类,这些类称为Wrappers。 包装是字节,整数,短,长,字符,布尔,双精度和浮点型。

34. What is a Constructor? A Constructor is a special member function whose primary task is to initialize objects of its class. The constructor is invoked whenever an object of its class with which it is associated to is created. It is named as constructor because it constructs the values of class data members. It is special because its name is the same as its class name.

34.什么是构造函数? 构造函数是一个特殊的成员函数,其主要任务是初始化其类的对象。 每当创建与其关联的类的对象时,就会调用构造函数。 之所以命名为构造器,是因为它构造了类数据成员的值。 这很特别,因为它的名称与类名相同。

35. What is New Operator? A New Operator is used to create a New Object or a New Array. Integer variableInteger = new Integer(25);

35.什么是新运营商? 新建运算符用于创建新对象或新数组。 整数variableInteger = new Integer(25);

36. Enlist Visibility Modifiers in Java. The visibility modifiers in Java are as follows: 1. Public: Visible from methods in any class in the same program. 2. Private: Accessible only from Functions inside the class. Unable to access outside the Class. 3. Protected: Accessible from functions in any class in the same package and from any subclass anywhere in the program.

36.使用Java征集可见性修改器。 Java中的可见性修饰符如下: 1. Public:从同一程序中任何类的方法中可见。 2.私有:只能从类内部的函数访问。 无法在课程外访问。 3.受保护:可从同一包中任何类中的函数以及程序中任何位置的任何子类访问。

37. What is javap? javap is a command that works as a Disassembler. It basically disassembles a Class file and prints its Output to Standard Output. It prints Protected, Public Fields and Methods and the Packages of the Classes passed as arguments to it.

37.什么是javap? javap是充当反汇编程序的命令。 它基本上反汇编一个Class文件,并将其输出打印到Standard Output。 它打印受保护的,公共字段和方法,以及作为参数传递给它的类的包。

38. What is an Interface in Java? An Interface in Java is basically a collection of Abstract Methods (Functions). The functions in an Interface are by default Public. An Interface contains behaviors that a Class implements. Once an interface is defined, any number of Classes can be used to implement that particular Interface. An Interface is implicitly an Abstract type.

38.什么是Java接口? Java中的接口基本上是抽象方法(函数)的集合。 接口中的功能默认情况下为Public。 接口包含类实现的行为。 定义接口后,可以使用任意数量的类来实现该特定接口。 接口隐式是一种抽象类型。

39. What are Abstract Classes in Java? Abstract Classes in Java are used to declare common characteristics of subclass. An abstract class cannot be instantiated. However, it can be sub-classed. An Abstract Class helps to provide a template or Design concrete subcalsses. If a Class has any abstract methods declared within it, the entire Class must be declared as Abstract. Syntax: Abstract type-name(argument);

39. Java中的抽象类是什么? Java中的抽象类用于声明子类的共同特征。 抽象类无法实例化。 但是,可以将其分类。 抽象类有助于提供模板或设计具体的子目录。 如果一个类中声明了任何抽象方法,则必须将整个类声明为抽象。 语法:抽象类型名称(参数);

40. What are Packages in Java? A Package is a combination of Related Types that offers Access Protection and Name Space management. It is basically a container for classes which are used to separate the Name Spaces. In Java, packages are of two types viz. API Packages and Built-in Packages. Packages are used to Control Access, prevent Naming Conflicts, Make use of Class, Interface easier and to Search or Locate data.

40.什么是Java包? 包是相关类型的组合,提供访问保护和名称空间管理。 它基本上是用于分隔名称空间的类的容器。 在Java中,程序包有两种类型。 API程序包和内置程序包。 程序包用于控制访问,防止命名冲突,使类,接口更容易使用以及搜索或查找数据。

41. Explain Finalize() method in Java. The finalize() function or method should explicitly define the tasks to be performed. It is therefore possible to define a method that will be invoked before an Object’s final destruction by the garbage collection mechanism. Protected keywords prevents the access of finalize() code from outside class. Java does not support destructor.

41.用Java解释Finalize()方法。 finalize()函数或方法应明确定义要执行的任务。 因此,可以定义一个方法,该方法将在垃圾回收机制对对象进行最终销毁之前调用。 受保护的关键字可防止外部类访问finalize()代码。 Java不支持析构函数。

42. Explain Exception Handling in Java. An Exception is basically an Error that occurs at Run Time. Java allows to rectify the Exception at Run Time. Therefore, the process of solving an Exception at Run Time is called as Exception Handling. It thereby provides a means to detect and report Exceptional Circumstances so that required measures can be taken.

42.解释Java中的异常处理。 异常基本上是在运行时发生的错误。 Java允许在运行时纠正异常。 因此,在运行时解决异常的过程称为异常处理。 因此,它提供了一种检测和报告异常情况的方法,从而可以采取必要的措施。

43. What are Streams in Java? A Stream in Java is an Abstraction that either Consumes or Produces Information. A Stream is linked to a physical device such as Input/Output. There are primarily following Type of Streams in Java viz. Byte Stream, Input Stream, Output Stream and Character Stream. An Input Stream is used to extract data from the Source File and sends it to the program whereas an Output file extracts data from the program and sends it to the destination file.

43. Java中的流是什么? Java中的流是消耗或产生信息的抽象。 流链接到物理设备,例如输入/输出。 Java viz中主要有以下流类型。 字节流,输入流,输出流和字符流。 输入流用于从源文件中提取数据并将其发送到程序,而输出文件用于从程序中提取数据并将其发送到目标文件。

44. What is javac? javac is the Java Compiler that helps to Translate Java Source Code into Java Byte Code or the .class file. This Bytecode can then be Interpreted and executed by Java Interpreter and converts into Machine Specific Binary Code.

44.什么是javac? javac是Java编译器,可帮助将Java源代码转换为Java字节码或.class文件。 然后,该字节码可以由Java Interpreter解释并执行,然后转换为机器特定的二进制代码。

45. Explain OutputStream Class in Java. This class is derived from the base class OutputStream which is an Abstract Class and therefore it is not possible to instantiate it. Output Stream Classes can be used to Write Bytes, Close the Stream and Flush Streams.

45.用Java解释OutputStream类。 该类派生自作为抽象类的基础类OutputStream,因此无法实例化它。 输出流类可用于写入字节,关闭流和刷新流。

46. Explain ByteStream Class and CharacterSteam Class in Java. ByteStreams Classes helps to provide a convenient way to handle Output and Input of Bytes. It is useful for Reading and Writing Binary data. ByteStreams in Java are unidirectional and hence they can transmit information in one direction only. Characters Streams are designed for handling the Input and Output of Characters into Files or Input/Output.

46.用Java解释ByteStream类和CharacterSteam类。 ByteStreams类有助于提供一种方便的方式来处理字节的输出和输入。 这对于读取和写入二进制数据很有用。 Java中的ByteStream是单向的,因此它们只能在一个方向上传输信息。 字符流设计用于将字符的输入和输出处理为文件或输入/输出。

47. What are Java Applets? An Applet is a Java program that can be executed in a Web browser. They are primarily developed for Internet purpose. It can therefore be embedded into HTML Web pages thereby making the website more dynamic. Applet runs remotely on the client Web Browser and cannot access any system resources on the Local Computer.

47.什么是Java Applet? Applet是可以在Web浏览器中执行的Java程序。 它们主要是为Internet目的而开发的。 因此,它可以嵌入HTML网页中,从而使网站更具活力。 Applet在客户端Web浏览器上远程运行,并且无法访问本地计算机上的任何系统资源。

48. Enlist AWT Controls. The AWT controls in Java are as follows: 1. Buttons 2. Canvas 3. Checkbox 4. List 5. Label

48.征募AWT控件。 Java中的AWT控件如下: 1.按钮 2.画布 3.复选框 4.列表 5.标签

49. What are event listeners in Java? The Events that are invoked by the Graphical User Interface components are managed by Listener Class. It is basically an Interface. It is from the Package java.awt.event. It therefore handles the events that invoked on the User Interface. There are multiple Listener Interfaces which are WindowListener, ActionListener,MouseListener, ItemListener, ComponentListener, ContainerListener and much more.

49.什么是Java中的事件侦听器? 图形用户界面组件调用的事件由侦听器类管理。 它基本上是一个接口。 它来自程序包java.awt.event。 因此,它处理在用户界面上调用的事件。 有多个侦听器接口,分别是WindowListener,ActionListener,MouseListener,ItemListener,ComponentListener,ContainerListener等。

50. What is javadoc? Javadoc is a tool to generate HTML Documents from Java Source Code Files. It therefore provides Online documentation of Packages and Classes. All javadoc tags start with @ character symbol. It basically parses Source Files for Class Methods and Comments.

50.什么是javadoc? Javadoc是从Java源代码文件生成HTML文档的工具。 因此,它提供了包和类的在线文档。 所有javadoc标记均以@字符符号开头。 它基本上为类方法和注释解析源文件。

51. What is a Class? A Class is basically a template for defining behavior and states of the Objects of that particular Class. An entire set of data and code of an object can be made user-defined data type using a class. A Class is a Prototype that define Variables and Methods common to all the Objects of that particular Class. Objects are variables of Class type. Once a Class has been defined, we can create numerous Objects of its type.

51.什么是阶级? 类基本上是用于定义特定类的对象的行为和状态的模板。 可以使用类将对象的整个数据和代码集设置为用户定义的数据类型。 类是一种原型,它定义该特定类的所有对象共有的变量和方法。 对象是Class类型的变量。 一旦定义了一个类,我们就可以创建许多类型的对象。

52. What are the applications of Object Oriented Programming? The areas of applications for OOP includes: 1. Artificial Intelligence Systems 2. Simulation and Modelling 3. Real-Time Systems 4. Neural networks and Parallel Programming 5. Object Oriented Databases

52.面向对象编程的应用是什么? OOP的应用领域包括: 1.人工智能系统 2.仿真和建模 3.实时系统 4.神经网络和并行编程 5.面向对象的数据库

53. What is Encapsulation? Encapsulation is basically Wrapping up of data and functions into a single unit called as a Class. This protection of data from direct access by the program is called Data Hiding. Hence, The data is inaccessible to the external parties, only the functions wrapped inside class can access it.

53.什么是封装? 封装基本上是将数据和功能包装到称为类的单个单元中。 防止程序直接访问数据的保护称为数据隐藏。 因此,外部方无法访问该数据,只有包装在类中的函数才能访问它。

54. What is JRE? JRE helps in execution of Java Programs. It comprises of JVM, Deployment Technologies, Run-Time Class Libraries and User Interface Toolkits.

54.什么是JRE? JRE帮助执行Java程序。 它包括JVM,部署技术,运行时类库和用户界面工具包。

55. What is Swing in Java? Swing is basically a set of customizable graphical components whose look and feel can be determined at run time. Swing is an extension library to the AWT that includes New and Enhanced components that co-ordinates functionality of Graphical User Interface. Swing is a part of JFC.

55.什么是Java Swing? Swing基本上是一组可自定义的图形组件,其外观可以在运行时确定。 Swing是AWT的扩展库,其中包括协调图形用户界面功能的新增组件和增强组件。 Swing是JFC的一部分。

56. Enlist Types of Java Applets. The Types of Applets in Java are as follows: 1. Local Applet: It is an applet that is locally developed in a computer system and is stored on that system itself. Hence, the web page doesn’t need any internet connection to load that web applet within the same system.

56.征用Java Applet的类型。 Java中Applet的类型如下: 1.本地Applet:它是在计算机系统中本地开发并存储在该系统本身上的Applet。 因此,该网页不需要任何互联网连接即可在同一系统中加载该Web小程序。

2. Remote Applet: It is an applet that is developed by a Third-Party and stored on another computer. It can accessed by millions of people worldwide through their own computers. It therefore needs access to internet.

2.远程小程序:这是由第三方开发并存储在另一台计算机上的小程序。 全球数以百万计的人可以通过自己的计算机访问它。 因此,它需要访问互联网。

So this was the list of some important core Java interview questions and answers. If you found any information incorrect or missing in above list then please mention it by commenting below.

因此,这是一些重要的Java核心访谈主题问答。 如果您在上面的列表中发现任何不正确或缺失的信息,请在下面的评论中提及。

翻译自: https://www.thecrazyprogrammer.com/2015/10/core-java-interview-questions-and-answers.html

java核心面试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值