Only topics covered directly during lectures will be on the exam.
This means that if a topic was not covered during the exam, you
can safely assume that it will not be on the exam. This means
that you are responsible for all topics covered during lecture.
The live exam will focus specifically on those topics covered on
one of the homework assignments, although fundamentals may be tested
(eg., creating and throwing exceptions).
Specifically, the topics that are fair game for examination include:
Class naming conventions
Use of public classes
Use of packaging and launching classes in a package with the JVM, in
conjunction with CLASSPATH, etc.
How the JVM finds classes to lauch (CLASSPATH)
Basic Data Types
Braces and variable scoping
How constants are defined
Basic java syntax (if/for/while loops, etc.)
Classes: What is a class? How does it differ from an object?
String class and core methods
Arrays and syntax for creating them
Parsing Strings
Java Pass By Value vs. Pass By Reference
Constructors and associated rules (inheritance)
Static attributes and methods
Encapsulation
Polymorphism
Inheritance
Overriding and Overloading of methods
Visibility (public, private, protected, etc.)
Abstract Classes
Interfaces
Composition and Delegation
Inner Classes
Basic Design Patterns (Singleton, Template Method)
Exceptions (and defining your own)
Basic Java I/O
Collections
JDBC
Java Sockets
Java Multithreading
Examples of exam question:
Question 1:
class A {
static void display ( ){ System.out.println ( "Class A" ) ; }
}
class B extends A {
static void display ( ) { System.out.println ( "Class B"
); }
}
When we create an object and call the display ( ) method as:.
A aa = new B() ;
aa.display ( )
1. What is displayed ??
2. What if display is non-static??
Question 2:
List the visibility keywords in order of most to least restrictive.
1. private default protected public
2. public protected default private
3. private protected default public
4. public default private protected
Question 3:
Can a static variable be used in a non-static context?