Monday, 15 April 2013
Sunday, 14 April 2013
Wednesday, 10 April 2013
JAVA Sample QUESTIONS
JAVA Sample QUESTIONS
1. What is an object.
2. What is a class.
3. Polymorphism examples.Two types of
polymorphism.
4. Over riding. Over loading difference.
5. Abstraction ,Encapsulation.
6. Inheritance.
7. OOPs.
8. Java features.
9. Web browser and different web browsers.
10. Minimum requirements of java.
11. APIs egs.
12. Commands for compiling and executing.
13. What will be generated if you compile a program.
14. Syntax for class declaration.
15. Syntax for creating an object.
16. How do you call a method(using what)? Syntax of calling a
method.
17. Syntax of writing a main() function. Explain each keyword in
that statement.
18. Command which is used to print a message on screen.
19. Identifiers and rules for defining them.
20. JVM(Java Virtual Machine).
21. Explain what are command line arguments. Where do you pass them.
Write the syntax of passing those arguments.
22. What is variable, constant, datatype.
23. How many types of datatypes. Examples.
24. Ranges of datatypes.
25. How can you declare symbolic constants. And why.
26. What is difference between instance variables and class
variables.
27. What are locall and global variables.
28. What is type casting .Examples.How many types.Write the syntax
of casting them.
29. Operators. Different types.
30. Syntax of conditional operator. Explain.
31. Precedence of operators.(Which is highest and lowest
priorities).
32. What are collections.
33. If statements and types of if with syntax and explain
switch.
34. Difference between while and do-while loops in execution(How is
the execution from both)
35. Enhanced for loop with a sample example with explanation.
36. What are labeled loops. Jumping loops.
37. What are members , methods.How are they declared.(Should be
explained using classes)
38. What are the 2 steps involved in creating an object.(Declaration
and instantiation explanation).
39. How are the members of class accessed.
40. Example program of Method Overloading.
41. What are static members.
42. Inheritance concepts.Outline of a program which illustrates
inheritance.
43. What is a super class, sub class.What are other names given to
them.
44. What is over riding.
45. Final variables and method. Finalize r method.
46. What are abstract methods and classes.
47. Purpose of var-args. Syntax.
48. Different access-specifiers.
49. What are arrays. How do you declare an array?
50. What is an index. What is the other name of index.
51. Syntax of creating two-dimensional arrays.
52. Which is the class used to define a string variable.
53. What are various methods of stings. Explain with syntax.
54. Vector . How to declare them.
55. What are the different ways of converting numbers using
constructor methods.
56. Boxing and unboxing.
57. What are interfaces. How do you implement them. Syntax.
58. Different possible ways where the interface can be implemented.
59. What are packages. What are different predefined packages in the
system.
60. Explain the overall concept of how the packages are saved and
how do we import them.
61. What should be done to add a new class to an existing package.
62. Purpose of static import.
63. What is a thread. Explain the concept of multithreading.
64. Run() method.
65. How to create a new thread.(What are the two ways of creating).
66. Which method calls the run() method.
67. How can you block a thread, and method used to stop a thread?
68. How can you make a thread into runnable state from blocked
state?(methods used).
69. What are the different states where a thread can go into?
70. What does a yield() method do?
71. How can you set priorities to threads.(method used to set
priority)
72. Concept of synchronization.
73. What is dead lock.
74. Using Runnable Interface . What are the 4 steps involved in
using the interface.
75. Compile time and run time errors.
76. How can we handle run time errors.
77. Explain try and catch blocks.(what are the tasks done in each of
the block)
Need toi explain
‘hit’,’throw’,’catch’.
78. Name few commonly used exceptions and cause.
79. How does multiple catch statements work.
80. Use of finally statement.
81. How to throw our own exceptions. Explain with example(what is
the statement which is used throw such exceptions)
82. Applet definitions. How to run them. Few main differences
between an applet and a stand alone application.
83. Explain paint(), Graphics class, init(), start() methods.
84. What are packages needed to imported. What does that package
contain.(why do you import only those packages).
85. Different states of an applet. And methods called when an applet
is in that state.
86. Small applet code to define an applet.
87. Write a HTML code that calls an applet to execute.
88. Steps performed to run an applet.
89. Use of align attribute.
90. Explain some tags used in html.
91. What is the class which is used to insert a text box. Write the
syntax of entering a text box in applet.
92. How can you pass parameters in an applet.( what is the method
used).
93. All the questions based on an applet program which is asked for
you in your lab examination. i.e., All the new concepts that are used in your
program which you have executed.
Java Question Bank 3 units
BSC (Computer
Science) Question Bank
Subject: Object
Oriented Programming with Java
Unit-I
1. What is OOP? Explain the basic concepts
of OOPS with examples?
2.What are the Benefits and Applications of OOPs?
3.What are the features of JAVA?
4.How much JAVA differs from C and C++?
5.How JAVA associated with internet and brings out its
contribution to WWW?
6.What are web browsers? Explain various types?
7.What are the hardware and software requirements of
java? Explain
the systems that supports java, required for java?
8.What are tools that are included in JDK. Explain with
the flow chart? What are mostly used packages?
9.Explain a simple java program and the unique features
of a program?
10.Write program to find the area of a room. Explain the
basic structures of a java program?
11.What are java Tokens and five types of tokens in java?
12.Classification of java statements with diagram?
13.What are the steps involved in implementation of java
program?
14.What are command line arguments? Explain with simple
program?
15.What are the various types of constants which java
supports?
16.What are the 2 ways .Through which we can assign
values to variables?
17.Write a program to illustrate how to
read data from the keyboard?
18.What are the 3 kinds of java variables .Describe
briefly the problems which arise using symbolic constants?
19.What is type casting? Explain briefly? Program to
illustrate to creation and casting of a program?
Unit-II
1.Explain about arithmetic operators
with examples?
2.What are the different types of
Relational operators.Explain with a program?
3.What are the different types of
logical operators? Explain the concept of assignment
operators with advantages using them?
4.How many types of If statements are
there?Explain with syntax and examples.
5.Write a program which illustrates switch case
statement?
6.What is looping?what are the four steps which are
included in the looping process?Explain while loop with examples?
7.How is the execution of for loop done? Write a
program to compute the ‘power of 2’using for loop?
8.How is the nesting done in for loops?
9.How are the jumps done in loops? Explain with
example?
10.How are the labels defined in Java? Illustrate it
with the program?
11.What is class? How are variables and methods
defined in class?
12.How do you create objects? How are the members
of the class accessed using objects?
13.Write a program to calculate area of room using
classes?
14.What is a Constructor? When the constructor is invoked
and how?
15.Define method overloading? Write a program to
illustrate it?
16.What is the purpose of using static members and
write a program using static?
17.Explain the concept of inheritance with examples
and also write a program?
18.What are the different types of inheritance
.Explain?
19.What are access modifiers? How many types of access
modifiers are there?
Unit-III
1.What is an Array? How is an array created in a
one-dimensional array? Explain with examples?
2.Write a program to sort the elements in an array?
3.Explain two-dimensional arrays with examples?
4.Write a program to illustrate two dimensional array?
5.How can we implement strings? Write a program to sort
the strings in alphabetical order?
6.Write a program to illustrate the manipulation of
strings?
7.What is the class used to create generic dynamic
arrays? What are its advantages?
8.What is the difference between autoboxing and
unboxing>
9.What are the advantages of using enumerated types?
Write a program to illustrate it?
10.What are interfaces? Define them with examples? How
can they be extended?
11.How can ca class implement interfaces? Write a program
using interfaces?
12.write a program to show that interfaces supports
multiple inheritance?
13.What are packages? Briefly list the benefits of
packages?
14.Differentiate between java API packages and system
packages?
15.How can the packages be used in other classes or
clients?
16.What is static import? Explain its use?
17.How will you declare a class in-order to hide them?
18.How can we add classes to an existing package? Explain
briefly?
C++ April-2010
C++
April-2010 SAE3A/SAZ3A
Part-A
1. What is polymorphism?
2. Define inline function?
3. What is a copy constructor?
4. What is meant by derivation?
5. What is a file?
6. Define ordered list. Give an example.
7. Write any two applications of stack.
8. What is prefix expression?
9. Define simple path.
10. What is a binary tree?
11. Define tokens.
12. Write any two Error Handling Functions in C++.
Part-B
13. Explain the concept of friendly functions.
14. Discuss ios format functions.
15. Write a note on Command-line arguments.
16. Explain the procedure to convert infix expression into postfix expression.
17. Explain the postorder traversal algorithm with an example.
18. Write short notes on Hierarchical Inheritance.
19. Write a C++ program to add two complex numbers using operator overloading.
Part-C
20. Explain the following: a)Function Prototyping b)Call by reference.
21. What are the various types of constructors? Explain any two of them with syntax and examples?
22. Explain the procedure to add two polynomials using arrays.
23. Briefly explain the concept of queue. Also write the procedures to add delete elements in a queue.
24. Explain shortest path algorithm with an example.
April-2010 SAE3A/SAZ3A
Part-A
1. What is polymorphism?
2. Define inline function?
3. What is a copy constructor?
4. What is meant by derivation?
5. What is a file?
6. Define ordered list. Give an example.
7. Write any two applications of stack.
8. What is prefix expression?
9. Define simple path.
10. What is a binary tree?
11. Define tokens.
12. Write any two Error Handling Functions in C++.
Part-B
13. Explain the concept of friendly functions.
14. Discuss ios format functions.
15. Write a note on Command-line arguments.
16. Explain the procedure to convert infix expression into postfix expression.
17. Explain the postorder traversal algorithm with an example.
18. Write short notes on Hierarchical Inheritance.
19. Write a C++ program to add two complex numbers using operator overloading.
Part-C
20. Explain the following: a)Function Prototyping b)Call by reference.
21. What are the various types of constructors? Explain any two of them with syntax and examples?
22. Explain the procedure to add two polynomials using arrays.
23. Briefly explain the concept of queue. Also write the procedures to add delete elements in a queue.
24. Explain shortest path algorithm with an example.
Subscribe to:
Comments (Atom)