CS 6308 Java Programming
CS 6308 Java Programming
M I I I I
SI Questions Marks CO BL
No.
1. Identify the errors in the following code: 2 COl L2
public int searchAccount( int[2S] number) {
number = newint[15];
for (int i = 0; i < number.length; i++) {
number[i] = number[i-l] + number[i+l];
}
return number;
}
2. Find out what is wrong in the following code? 2 C01,C02 LI
public class Test {
private int id;
public void m l ( ) {
this.id = 45;
}
public void m2() {
Test.id = 45;
}
}
3. Differentiate between overriding and overloading. 2 C01,C02 L2
4. What is the need for the layout managers? What is the 2 C01,C02 LS
defaultJayout manager for a frame? How can the component *
added to a frame?
5. Using the try-catch block, write a code fragment that opens 2 C01,C02 L4
a file "default.dat".
6. What are the different ways of implementing multithreading 2 C04, L2
in a Java program?
V
Part - B (8 X 8 = 64 Marks)
(Answer any 8 questions)
SI Questions Marks CO BL
No.
11 A teacher has five students who have taken four tests and COl L2,
the test scores are stored in 2D array. The following LS
grading scale is assigned to a student based on average of
his/her four tests.
Test Score Grade
90-100 A
80-89 B
70-79 C
60-69 D
0-S9 F
Workshop Fee(Rupees)
Network Security 295
Advanced Java 395
Programming
Spring Framework 495