CSC409 Advanced Java Programming

Advanced Java ProgrammingTU Board 2081

Differentiate between path and class path in Java. When do you prefer anonymous inner class? Consider the following program and answer the given questions. class A class B public void test() int i =…

10

Differentiate between path and class path in Java. When do you prefer anonymous inner class? Consider the following program and answer the given questions.
class A {
class B {
public void test() {
int i = 0;
while (i<=100){
System.out.println(i);
i = i + 2;
}
}
}
}

Name the list of class file created after compiling above program
Rewrite the above program using for loop

A worked answer is on its wayMeanwhile, read the Advanced Java Programming notes for this topic.

Discussion

Loading…

More Advanced Java Programming questions

All Advanced Java Programming old questions