TOP 100 J2SE Interview Questions and Answers pdf fresher and experienced

Read the most frequently asked 100 top J2SE interview questions and answers for freshers and  experienced.....

J2SE Interview Questions and Answers PDF Experienced Freshers
1. What is Java API?
Application Programming Interface. The specification of how a programmer writing an application accesses the behavior and state of classes and objects.

2. What is applet?
A component that typically executes in a Web browser, but can execute in a variety of other applications or devices that support the applet programming model.

3. What is actual parameter list?
The arguments specified in a particular method call. See also formal parameter list.

4. What is ASCII?
American Standard Code for Information Interchange. A standard assignment of 7-bit numeric codes to characters. See also Unicode.

5. What is ACID?
The acronym for the four properties guaranteed by transactions: atomicity, consistency, isolation, and durability.

6. What is access control?
The methods by which interactions with resources are limited to collections of users or programs for the purpose of enforcing integrity, confidentiality, or availability constraints.

7. What is atomic?
Refers to an operation that is never interrupted or left in an incomplete state under any circumstance.

8. What is authentication?
The process by which an entity proves to another entity that it is acting on behalf of a specific identity.

9. What is autoboxing?
Automatic conversion between reference and primitive types.

10. What is abstract?
A Java keyword used in a class definition to specify that a class is not to be instantiated, but rather inherited by other classes. An abstract class can have abstract methods that are not implemented in the abstract class, but in subclasses.

11. What is Abstract Window Toolkit (AWT)?
A collection of graphical user interface (GUI) components that were implemented using native-platform versions of the components. These components provide that subset of functionality which is common to all native platforms. Largely supplanted by the Project Swing component set. See also Swing.

12. What is bean?
A reusable software component that conforms to certain design and naming conventions. The conventions enable beans to be easily combined to create an application using tools that understand the conventions.

13. What is block?
In the Java programming language, any code between matching braces.
Example:
{
x = 1;
}

14. What is bitwise operator?
An operator that manipulates the bits of one or more of its operands individually and in parallel. Examples include the binary logical operators (&, |, ^), the binary shift operators (<< , >>, >>> ) and the unary one's complement operator (~).

15. What is binary operator?
An operator that has two arguments.

16. What is case?
A Java keyword that defines a group of statements to begin executing if a value specified matches the value defined by a preceding switch keyword.

17. What is bytecode?
Machine-independent code generated by the Java compiler and executed by the Java interpreter.

18. What is break?
A Java keyword used to resume program execution at the statement immediately following the current statement. If followed by a label, the program resumes execution at the labeled statement.

19. What is boolean?
Refers to an expression or variable that can have only a true or false value. The Java programming language provides the boolean type and the literal values true and false.

20. What is casting?
Explicit conversion from one data type to another.

21. What is catch?
A Java keyword used to declare a block of statements to be executed in the event that a Java exception, or run time error, occurs in a preceding try block.

22. What is abstract schema?
The part of an entity bean's deployment descriptor that defines the bean's persistent fields and relationships.

23. What is abstract schema name?
A logical name that is referenced in EJB QL queries.

24. What is activation?
The process of transferring an enterprise bean from secondary storage to memory.

25. What is anonymous access?
Accessing a resource without authentication.

26. What is a class?
In the Java programming language, a type that defines the implementation of a particular kind of object. A class definition defines instance and class variables and methods, as well as specifying the interfaces the class implements and the immediate superclass of the class. If the superclass is not explicitly specified, the superclass will implicitly be Object.

27. What is constructor?
A pseudo-method that creates an object. In the Java programming language, constructors are instance methods with the same name as their class. Constructors are invoked using the new keyword.

28. What is compositing?
The process of superimposing one image on another to create a single image.

29. What is compiler?
A program to translate source code into code to be executed by a computer. The Java compiler translates source code written in the Java programming language into bytecode for the Java virtual machine1. See also interpreter.

30. What is compilation unit?
The smallest unit of source code that can be compiled. In the current implementation of the Java platform, the compilation unit is a file.

31. What is comment?
In a program, explanatory text that is ignored by the compiler. In programs written in the Java programming language, comments are delimited using
//
or
/*...*/.

32. What is codebase?
Works together with the code attribute in the <APPLET> tag to give a complete specification of where to find the main applet class file: code specifies the name of the file, and codebase specifies the URL of the directory containing the file.

33. What is client?
In the client/server model of communications, the client is a process that remotely accesses resources of a compute server, such as compute power and large memory capacity.

34. What is classpath?
An environmental variable which tells the Java virtual machine1 and Java technology-based applications where to find the class libraries, including user-defined class libraries.

35. What is class variable?
A data item associated with a particular class as a whole--not with particular instances of the class. Class variables are defined in class definitions. Also called a static field. See also instance variable.

36. What is class method?
A method that is invoked without reference to a particular object. Class methods affect the class as a whole, not a particular instance of the class. Also called a static method. See also instance method.

37. What is distributed?
Running in more than one address space.

38. What is derived from?
Class X is "derived from" class Y if class X extends class Y. See also subclass, superclass.

39. What is delegation?
An act whereby one principal authorizes another principal to use its identity or privileges with some restrictions.

40. What is default?
A Java keyword optionally used after all case conditions in a switch statement. If all case conditions are not matched by the value of the switch variable, the default keyword will be executed.

41. What is critical section?
A segment of code in which a thread uses resources (such as certain instance variables) that can be used by other threads, but that must not be used by them at the same time.

42. What is core packages?
The required set of APIs in a Java platform edition which must be supported in any and all compatible implementations.

43. What is CORBA?
Common Object Request Broker Architecture. A language independent, distributed object model specified by the Object Management Group (OMG).

44. What is continue?
A Java keyword used to resume program execution at the end of the current loop. If followed by a label, continue resumes execution where the label occurs.

45. What is deprecation?
Refers to a class, interface, constructor, method or field that is no longer recommended, and may cease to exist in a future version.

46. What is definition?
A declaration that reserves storage (for data) or provides implementation (for methods). See also declaration.

47. What is declaration?
A statement that establishes an identifier and associates attributes with it, without necessarily reserving its storage (for data) or providing the implementation (for methods). See also definition.

48. What is credentials?
The information describing the security attributes of a principal. Credentials can be acquired only through authentication or delegation.

49. What is core class?
A public class (or interface) that is a standard member of the Java Platform. The intent is that the core classes for the Java platform, at minimum, are available on all operating systems where the Java platform runs. A program written entirely in the Java programming language relies only on core classes, meaning it can run anywhere. .

50. What is conversational state?
The field values of a session bean plus the transitive closure of the objects reachable from the bean's fields. The transitive closure of a bean is defined in terms of the serialization protocol for the Java programming language, that is, the fields that would be stored by serializing the bean instance.

51. What is const?
A reserved Java keyword not used by current versions of the Java programming language.

52. What is for?
A Java keyword used to declare a loop that reiterates statements. The programmer can specify the statements to be executed, exit conditions, and initialization variables for the loop.

53. What is finally?
A Java keyword that executes a block of statements regardless of whether a Java Exception, or run time error, occurred in a block defined previously by the try keyword.

54. What is field?
A data member of a class. Unless specified otherwise, a field is not static.

55. What is executable content?
An application that runs from within an HTML file. See also applet.

56. What is exception?
An event during program execution that prevents the program from continuing normally; generally, an error. The Java programming language supports exceptions with the try, catch, and throw keywords. See also exception handler.

57. What is enum?
A Java keyword used to declare an enumerated type.

58. What is EmbeddedJava Technology?
The availability of Java 2 Platform, Micro Edition technology under a restrictive license agreement that allows a licensee to leverage certain Java technologies to create and deploy a closed-box application that exposes no APIs.

59. What is DTD?
Document Type Definition. A description of the structure and properties of a class of XML files.

60. What is double?
A Java keyword used to define a variable of type double.

61. What is do?
A Java keyword used to declare a loop that will iterate a block of statements. The loop's exit condition can be specified with the while keyword.

62. What is goto?
This is a reserved Java keyword. However, it is not used by current versions of the Java programming language.

63. What is float?
A Java keyword used to define a floating point number variable.

64. What is final?
A Java keyword. You define an entity once and cannot change it or derive from it later. More specifically: a final class cannot be subclassed, a final method cannot be overridden and a final variable cannot change from its initialized value.

65. What is extends?
Class X extends class Y to add functionality, either by adding fields or methods to class Y, or by overriding methods of class Y. An interface extends another interface by adding methods. Class X is said to be a subclass of class Y. See also derived from.

66. What is exception handler?
A block of code that reacts to a specific type of exception. If the exception is for an error that the program can recover from, the program can resume executing after the exception handler has executed.

67. What is enumerated type?
A type whose legal values consist of a fixed set of constants.

68. What is encapsulation?
The localization of knowledge within a module. Because objects encapsulate data and implementation, the user of an object can view the object as a black box that provides services. Instance variables and methods can be added, deleted, or changed, but as long as the services provided by the object remain the same, code that uses the object can continue to use it without being rewritten. See also instance variable, instance method.

69. What is else?
A Java keyword used to execute a block of statements in the case that the test condition with the if keyword evaluates to false.

70. What is double precision?
In the Java programming language specification, describes a floating point number that holds 64 bits of data. See also single precision.

71. What is DOM?
Document Object Model. A tree of objects with interfaces for traversing the tree and writing an XML version of it, as defined by the W3C specification.

72. What is distributed application?
An application made up of distinct components running in separate runtime environments, usually on different platforms connected through a network. Typical distributed applications are two-tier (client/server), three-tier (client/middleware/server), and n-tier (client/multiple middleware/multiple servers).

73. What is formal parameter list?
The parameters specified in the definition of a particular method. See also actual parameter list.

74. What is generic?
A class, interface, or method that declares one or more type variables. These type variables are known as type parameters. A generic declaration defines a set of parameterized types, one for each possible invocation of the type parameter section. At runtime, all of these parameterized types share the same class, interface, or method.

75. What is Java Compatibility Kit (JCK)?
A test suite, a set of tools, and other requirements used to certify a Java platform implementation conformant both to the applicable Java platform specifications and to Java Software reference implementations.

76. What is Java Card API?
An ISO 7816-4 compliant application environment focused on smart cards.

77. What is Java 2 SDK, Standard Edition?
The Software Development Kit (SDK) is development environment for building applications, applets, and components using the Java programming language. This SDK provides a reference implementation of the J2SE platform.

78. What is Java?
A set of technologies for creating and safely running software programs in both stand-alone and networked environments.

79. What is JAIN?
Java APIs for Integrated Networks (JAIN)

80. What is IP?
Internet Protocol. The basic protocol of the Internet. It enables the unreliable delivery of individual packets from one host to another. It makes no guarantees about whether or not the packet will be delivered, how long it will take, or if multiple packets will arrive in the order they were sent. Protocols built on top of this add the notions of connection and reliability. See also TCP/IP.

81. What is interface?
A Java keyword used to define a collection of method definitions and constant values. It can later be implemented by classes that define this interface with the "implements" keyword.

82. What is instanceof?
A two-argument Java keyword that tests whether the runtime type of its first argument is assignment compatible with its second argument.

83. What is instance method?
Any method that is invoked with respect to an instance of a class. Also called simply a method. See also class method.

84. What is implements?
A Java keyword included in the class declaration to specify any interfaces that are implemented by the current class.

85. What is if?
A Java keyword used to conduct a conditional test and execute a block of statements if the test evaluates to true.

86. What is identifier?
The name of an item in a program written in the Java programming language.

87. What is HTML?
HyperText Markup Language. This is a file format, based on SGML, for hypertext documents on the Internet. It is very simple and allows for the embedding of images, sounds, video streams, form fields and simple text formatting. References to other objects are embedded using URLs.

88. What is hexadecimal?
The numbering system that uses 16 as its base. The marks 0-9 and a-f (or equivalently A-F) represent the digits 0 through 15. In programs written in the Java programming language, hexadecimal numbers must be preceded with 0x. See also octal.

89. What is group?
A collection of principals within a given security policy domain.

90. What is JavaBeans?
A portable, platform-independent reusable component model. A component that conforms to this model is called a bean.

91. What is Java Runtime Environment (JRE)?
A subset of the Java Development Kit (JDK) for end-users and developers who want to redistribute the runtime environment alone. The Java runtime environment consists of the Java virtual machine1, the Java core classes, and supporting files.

92. There are 3 distinct editions of the Java Platform explain?
? Java 2 Platform, Enterprise Edition:
The edition of the Java platform that is targeted at enterprises to enable development, deployment, and management of multi-tier server-centric applications.

? Java 2 Platform, Micro Edition:
The edition of the Java platform that is targeted at small, standalone or connectable consumer and embedded devices to enable development, deployment, and management of applications that can scale from smart cards through mobile devices and set-top boxes to conventional computing devices.

? Java 2 Platform, Standard Edition:
The edition of the Java platform that enables development, deployment, and management of cross-platform, general-purpose applications.

93. What is Java Platform?
Consists of class libraries, a Java virtual machine (JVM) and class loader (which comprise the runtime environment) and a compiler, debugger and other tools (which comprise the development kit). In addition, the runtime platform is subject to a set of compatibility requirements to ensure consistent and compatible implementations. Implementations that meet the compatibility requirements may qualify for Sun's targeted compatibility brands. Java 2 is the current generation of the Java Platform.

94. What is Java Naming and Directory Interface (JNDI)?
A set of APIs that assists with the interfacing to multiple naming and directory services.

95. What is Java Media APIs?
A set of APIs that support the integration of audio and video clips, 2D fonts, graphics, and images as well as 3D models and telephony.

96. What is Java IDL?
Java Interface Definition Language

97. What is Java Development Kit (JDK)?
A software development environment for writing applets and applications in the Java programming language. Technically, the JDK is the correct name for all versions of the Java platform from 1.0 to 1.1.x.

98. What is JavaCheck?
A tool for checking compliance of applications and applets to a specification.

99. What is Java virtual machine1?
A software "execution engine" that safely and compatibly executes the byte codes in Java class files on a microprocessor (whether in a computer or in another electronic device).

100. What is Java Remote Method Invocation (RMI)?
A distributed object model for Java program to Java program, in which the methods of remote objects written in the Java programming language can be invoked from other Java virtual machines1, possibly on different hosts.


0 comments:

Post a Comment