Sie sind auf Seite 1von 3

CP2 VIVA QUESTIONS

1. Features of java
2. Explain portable/platform independent, Robust, Multithreading and interpreted
feature of java.
3. Is portability & platform independency the same?
4. Though java gets executed in 2 stages,still it gives high performance, how?
5. Explain the main Line public static void main(String args[])
6. Explain how string args[] work in main line
7. What are instance static, and local variables?give there declaration place, scope and
life
8. how do we communicate with class members from outside the class?
9. for which type of variables initialization is mandatory in java
10. List five concepts which are there in c/c++ but not in java
11. Explain jdk, jvm, api
12. difference call by value n call by reference with one example each.
13. syntax for
• declaration of an array
• creation of array
• initialization of 1D and 2D array
• System.arraycopy method
14. in system.arraycopy method what is system? Why arraycopy is called with class
name system?
15. Give 1 example explaining array of objects. What are the steps which will make that
array execute?
16. Give drawbacks of arrays and their solution.
17. What are vectors? What do they store ? advantage and disadv.
18. what are classes known as which help in converting primitive data types to objects.
19. what is the default capacity of vector ?
20. give basic constructors of vector class.
21. consider the following
• Vector v1=new Vector()
• Vector v2=new Vector(5);
• Vector v3=new Vector(5,3)
Give capacity & size of v1,v2,v3. what if I add 6th element in v2 n v3 what changes will
be observed in capacity of both the vectors

22. explain difference between size and capacity of vectors.


23. Give syntax of
• Adding an element
• Deleting an element displaing the list etc. for vectors.

24. Strings in java are immutable. Explain


25. Give the constructors of string class
26. String is primitive data type in java. True or false
27. what is difference between length and length().
28. if we were happy with strings, then y StringBuffer(SB) .
29. give constructirs of StringBuffer class
30. Give default capacity of SB.
31. consider the following n give size and capacity
• SB s1=new SB()
• SB s2=new SB(12);
• SB s3=new SB(“pooja”).

32. The only operator in java which is overloaded


33. what is operator overloading
34. what is function n constructur overloading
35. explain types of constructor
36 Explain method overriding
37. exception handling in java. Give mechanism for the same
38. Every try should have one catch oor finally or both. True or false
39. What is the exception object passed to the catch block does not match.
40. give syntax n working of
• Try catch
• Nested try catch
• Multiple try catch
• Finally
41. difference between throw n throws clause
42.can we create user defined exception what is thye procedure give 1 example
43. Different types of inheritance in java. Adv.
44. which type of inheritance is eliminated from java. Y. what is the solution
45. is the following code correct.
Try
{

}
catch(Exception e){}
catch(ArithmeticException e){}

46. give uses of keyword Super


47. What is abstract class? Whats the need? What becomes necessary of the subclass
which extends the abstract class? is object of abstract class created? If no\yes y?
48. what if we declare a class final? Can we declare a class final and abstract
simultaneously?
49. syntax for interface?
50. difference bet. Abstract class n interface
51. special thing about the variable declared inside the interface is.
52. can we extend the interfaces.
53. what if the class which implements the interface does not define all the methods of
the interface?
54. what is multithreading n multitasking
55. two ways of creating a threading
56. Life cycle of a thread
57. Give the methods of the thread class
58. if we were happy creating a thread by thread class what was the need of runnable
interface
59. do we have all the methods of thread class present in runnable interface. If no which
is the only method present in the runnable interface.
60 Synchronisation
61. what are applets. Difference between applet n application. Life cycle of an applet.
62. can we use main method for applet programming if no then which method does the
work instead?
63. what are the packages n classes neede for applets?
64. Give the applet tag
65. give two ways of executing an applet.
66. what does PARAM tag do. Give one example along with the syntax.
67. rules for creating n importing packages. Their adv.
68. give access specifiers in java
69. Static members in java.

Das könnte Ihnen auch gefallen