J2SE INTERVIEW QUESTIONS AND ANSWERS

60+ TOP J2SE Interview Questions and Answers

J2SE Interview Questions
J2SE Interview Questions

1. 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.

2. What is abstract class ?
A class that contains one or more abstract methods, and therefore can never be instantiated. Abstract classes are defined so that other classes can extend them and make them concrete by implementing the abstract methods.

3. What is abstract method ?
A method that has no implementation.

4. 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.

5. 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.

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

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

8. What is API ?
Application Programming Interface. The specification of how a programmer writing an application accesses the behavior and state of classes and objects.

9. 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.

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

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

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

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

14. 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.

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

16. 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 (~).

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

18. 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.

19. 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.

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

21. 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.

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

23. 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.

24. What is “abstract schema” ?
The part of an entity bean’s deployment descriptor that defines the bean’s persistent fields and relationships.

25. What is “abstract schema name” ?
A logical name that is referenced in EJB QL queries.

26. 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.

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

28. What is “activation” ?
The process of transferring an enterprise bean from secondary storage to memory. (See passivation.)

29. What is “anonymous access” ?
Accessing a resource without authentication.

30. What is 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.

31. 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.

32. 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.

33. 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.

34. 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.

35. 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.

36. 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 /*…*/.

37. What is commit ?
The point in a transaction when all updates to any resources involved in the transaction are made permanent.

38. 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.

39. 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.

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

41. 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.

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

43. 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.

44. 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.

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

46. 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. .

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

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 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.

50. 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.

51. 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.

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

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

54. 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.

55. What is derived from ?
Class X is “derived from” class Y if class X extends class Y. See also subclass, superclass.

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

57. 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).

58. 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.

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

60. 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.

Real TIme J2SE Interview Questions