Skip to main content

Posts

Showing posts with the label Java Objective Type Q&A

Objective type questions and answers part-2

 Exception Handling Questions and Answers in Java Programming  Objective Type Q&A(part 2) 1:  An exception is an abnormal condition that arises in a block of statements during program execution 2: In java,exceptions are the sub-classes of the built-in class throwable 3: In java an exception is an object that describes an abnormal condition that has occurred in a piece of code. 4: Exception class is sub-classed to create a user-defined exception. 5:Exceptions of the RuntimeException type are automatically defined for java programs. 6: When using multiple catch statements,if the exception sub-classes are not placed before their super-classes unreachable code error occurs. 7: A method specifies the exceptions that are not handled by it using the throws keyword 8: throw keyword is used to throw an exception explicitly 9: OutOfMemory is an example off Error type of exception

Acronyms to remember in Java programming

Acronyms to remember in Java programming Introduction to java programming-very important theory notes

java programming questions and answers for beginners-part1

  Java coding test questions and answers  Objective Type Q&A(part1) Array indexes start with?--> A: zero Which keyword is used to create a class in Java?--> A: class To declare an array in Java, define the variable type with? --> A: [ ] Which keyword is used to import a package from the Java API library?--> A: import Why include comments in Java programs?--> A: clarity of code Which keyword is used to return a value inside a method? --> A: return Which statement is used to stop a loop?--> A: break When does method overloading is determined?--> A: At compile time Which concept of Java is achieved by combining methods and attributes into a class?--> A: Encapsulation compile time polymorphism is one type of polymorphism in Java programming. Method overriding is a combination of inheritance and polymorphism? --> A: true The value of a string variable can be surrounded by single quotes --> A: false In Java, it is possible to inherit attribu...

java programming questions and answers

 java coding test questions and answers Java Objective Type Q&A Object type Q&A     1. The first version of Java was actually named Oak      2. A single line statement in Java ends with semicolon     3. The execution of Java application begin at main method 4. Features of java is called as Java Buzzwords   oops concept & key word part object are combination of code and data that are treated as a single unit In objects, the behavior of the real-world entities is represented by method  In objects, data members/data elements define the state of an object Class is a model or blue -print from which an object is created. Binding the data to methods of an object is called encapsulation Polymorphism provides the mechanism of ‘one name but different implementations’ A class method is used to assign values to private instance variables of a class Inheritance enable software reusability w...