Java Reference
In-Depth Information
To extend your knowledge of the subjects covered today, try the following exercises:
1.
Use reflection to write a Java program that takes a class name as a command-line
argument and checks whether it is an application; all applications have a
main()
method with
public
and static as modifiers,
void
as a return type, and
String[]
as
the only argument.
2.
Write a program that creates a new object using
Class
objects and the
newInstance()
method that serializes the object to disk.
Where applicable, exercise solutions are offered on the topic's website at
http://www.