ETIT-303 Java Programming and Web Design
Tutorial 1
a)
b)
c)
d)
e)
f)
g)
h)
Can a top level class be private or protected?
Name and explain garbage collector thread.
What is Spaghetti code and how it is avoided in java?
Explain assert with a short code in java.
How can you force garbage collector in java?
What actually JVM is interpreter or compiler?
Can we use this keyword in abstract class?
Which interface must an object implement before it can be written to a stream as an
object?
i) What is partial implementation in java? What can be done to correct that? Write a
program on the same .
j) What is the output of following program?
public class test {
public static void main(String args[] )
{
int x = 3 ;
int y = 1 ;
if (x = y)
System.out.println(not equal);
else
Syetem.out.println(equal);
}
}