IVTL Infoview
Company
Programming
Program
Infoview Java Basics
1.It is not recommended to invoke a ________of the same class from the constructor.
a. Static method b. final method c. overridable method d. synchronized method
2.Which of the following features in not supported by Java?
a. Multithreading b. Reflection c. operator overloading d. Garbage Collection
3.Which class is the root(apex) call of all exception handling class hierarchy?
a. Throwable class b. Exception class c. Error class d. RuntimeException class
4.Java was influenced by and has features from many languages. which of the following did not influence java(when it was created)?
a. C++ Language b. Objective C Language c. C# Language d. Smalltalk language
5.Which of the following two modifiers cannot be combined together for a class?
a. public and strictfp b. public and final c. abtract and strict fp d. final and abstract
6.Which of the following methods need to be overridden if equals method is overidden?
a. hashCode method b. toString method c. compareTo method d. equal method
7.Which of the following is a checked exception?
a. IndexoutofBoundException b. FileNotFoundException c. NegativeArrarySizeException d. NullPointerException
8.Which of the following is the default access specifier for class member?
a. Public Access b. Private Access c. Protected Access d. Package Access
9.Which interface is not meant for serialization/peristence?
a. Externalizable b. Serializable c. Persistent d. None of the above
10.Which of the following is a 'marker interface'?
a. Comparable interface b. Enumerable interface c. Cloneble interface d. Runnable inerface
11.Which of the following statement is wrong?
a. An overridden method can declare to throw more checked exceptions than the base class method.
b. An overridden method can declare to throw less checked exceptions than the base class method.
c. An overridden method can declare to throw no exceptions compared to the base class method.
d. An overridden method can declare to throw less runtime exceptions than the base class method.
12.What is the range of 'byte' data type?
a. -128 to +127 b. -128 to +128 c. -255 to +255 d. -256 to +255
13.Which of following statment is true about assertion?
a. Assertion can be used to check if the passed argument in public method is valid or not.
b. It is recommended to have side-effect operation in assert condition.
c. Assertion are disabled during development but enabled during deployment
d. Assertion give us a way to test our assumptions during development and debugging.
14.Which of the following is not a predefined stream in Sytem class?
a. System.in b. System.out c. Systemn.log d. System.err
15.Which of the following operator is short-circuit operator?
a. &(bitwise AND operator) b. &&(logical AND operatot) c. |(bitwise OR operator) d. !(logical NOT operator)
16.Which of the following expression results in divide-by-zero exception(Arithmetic Exception)?
a. 10% 0 b. 1.0% 0.0 c. 10.0/0.0 d. 10/10-10
17.Which of the following is false about interfaces?
a. Inteface methods cannot be marked as final, native, strictfp, or synchronized.
b. An interface can extend one or more intefaces.
c. An inteface can implement another interface or a class
d. All Variable declared in interface are public, static and final
18.Which of following is the base class for unrecoverable exceptions and non programming errors that is thrown by the java runtime?
a. Throwable b. Error c. Exception d. Runtime Exception
19.What does AWT Stand for?
a. Abstract Windowing Toolkit b. A web Toolkit c. Absoultely Wonderful Toolkit d. Application With Type
20.Which of the following methods from Object is final(that is, cannot be overridden)?
a. Finalize method b. clone method c. hashCode method d. getClass method
Read Solution (Total 11)
-
- 13.An assertion is a statement in java that enables you to test your assumptions about your program. For example, if you write a method that calculates the speed of a particle, you might assert that the calculated speed is less than the speed of light. So the answer is option 'd'
- 8 years agoHelpfull: Yes(3) No(0)
- 1->C
2->C
3->A
4->C
5->D
6->A
7->B
8->A
9->D
10->C
11->A
12->A
13->D
14->C
15->B
16->C
17->D
18->A
19->A
20->D - 7 years agoHelpfull: Yes(2) No(0)
- Range of byte is -128 to 127
- 8 years agoHelpfull: Yes(1) No(0)
- 1. c
2. c
3. a
4. c
5. c
6. a
7. b
8. d
9. d
10. c
11. a
12. a
13. d
14. c
15. b
16. d
17. d
18. a
19. a
20. b
3 - 7 years agoHelpfull: Yes(1) No(0)
- 1.c
2.c
3.a
4.b
5.d
6.a
7.b
8.d
9.c
10.c
11.a
12.a
13.d
14.c
15.b
16.a
17.c
18.b
19.a
20.d - 7 years agoHelpfull: Yes(1) No(0)
- a gffg dfgg
- 8 years agoHelpfull: Yes(0) No(7)
- where is answers?
- 8 years agoHelpfull: Yes(0) No(6)
- where is the answer
- 8 years agoHelpfull: Yes(0) No(4)
- Wrong answers are provided
- 8 years agoHelpfull: Yes(0) No(0)
- 1)a
2)b
3)
4)d
5)d
6)
7)c
8)d
9)
10)
11)
12)a
13)
14)c
15)b
16)b
17)c
18)a
19)a
20) - 7 years agoHelpfull: Yes(0) No(0)
- . all are recommended
2.operator overloading
3. Throwable class
4.C# Language
5.final and abstract
6. equals method
7.FileNotFoundException
8. Package Access
9.None of the above
10.Comparable interface
11.. An overridden method can declare to throw more checked exceptions than the base class method.
12. -256 to +255
14.Systemn.log
15.&&(logical AND operatot)
16. 10.0/0.0
17.
a) Inteface methods cannot be marked as strictfp modifier.
b) An inteface can implement another interface or extends a class not more than one.
18.Throwable
19.Abstract Windowing Toolkit
20.getClass method - 6 years agoHelpfull: Yes(0) No(2)
IVTL Infoview Other Question