Home
 Object Oriented Concepts

JAVA FUNDAMENTALS 

1. Java applications will run on multiple hardware systems and operating systems (T/F)
2. You don't need a java interpreter if you have a java compiler (T/F)
3. Graphical user interface developed in java is platform dependent (T/F)
4. _______________ feature of java frees the programmer from worrying about explicitly de allocating memory.
5. Java supports pointers extensively and efficiently (T/F)
6. Computer memory can be accessed directly by java programs (T/F)
7. Java is a _____________________ programming language
8. Java applets are small stand alone programs (T/F)
9. In java main() is also a part of the class (T/F)
10. Explain the statement System.out.println () (SQ)
11. A java file should always have the extension .java (T/F)
12. _____________ is the command to compile a java program
13. _______________ is the command to run the java application
14. The java byte codes always run on the java virtual machine (T/F)
15. _____________ is the command to run a java applet
16. A java program must have a _______________ with the same name
17. If you have a class with the same name as the file name you need not have a main() function (T/F)
18. Java applet has to be always executed using an HTML file. (T/F)
19. The __________ tag in HTML file will allow you to run a java applet.
20. The java byte codes are actually downloaded to the client machine for execution (T/F)

 
JAVA LANGUAGE INTRODUCTION 

1. Java supports C++ type comments in its programs (T/F)
2. Boolean data type in java can have values True, False or 1, 0 (T/F)
3. >>> is a _________________ operator
4. Java creates an _____________ for each string literal
5. Is this valid in java (T/F)

Class scope {

	Public static void main (String args [])
	{
		int bar=1;
		{
			int bar=2;
		}
	}
}

6. Int in java is always _____ bits on any machine
7. Java supports unsigned int declarations (T/F)
8. Java supports automatic type conversion (T/F)
9. Java uses ________ character set to represent the characters in a string
10. In java a character is a 16 bit unsigned (T/F)
11. The operator ____ is used to allocate the space for an array
12. Like in 'C' java arrays can have elements more than the size declared (T/F)
13. ^ is a __________ operator
14.?: is called a ____________ operator
15. In java every class is a subclass of ______________ class
16. Java automatically reclaims the memory consumed by an unused object, this is called as __________
17. The _________ operator creates a single instance of a named class and returns a reference to that object.
18. The ______ operator is used to access the instance variables and methods within an object
19. Method name (void) declaration is valid in java (T/F)
20. A _________ is a method which initializes an object immediately upon creation
21. A constructor can have void as the return type (T/F)
22. Creating more than one methods with the same name, but different parameters is called method is called as ______________
23. Method overloading is used to provide java's __________________ behavior.
24. Method overloading and method overriding are same (T/F)
25. Explain method overloading and method overriding (SQ)
26. Explain inheritance in java (SQ)
27. ______________ keyword is used to create a subclass of a class
28. _____________ method directly refers to the superclas's constructor.
29. There is no way of having multiple inheritance in java (T/F)
30. What is the output of the program?
Class A {
	Void callme () {
		System.out.println ("Inside A's callme method ");
	}
}

Class B extends A {
	Void callme ()
	{
		System.out.println ("Inside B's callme method");
	}
}

Class Dispatch {
	Public static void main (String args [])
	{
		A a = new B ();
		a.callme ();
	}
 }
31. _______________ class is a class which declares the structure of a given abstraction without providing a complete implementation of every method.
32. ____________ is used for multiple inheritance in java.
33. A complete abstract class can be called as an interface (T/F)
34. Programmers are not allowed to create their own interfaces (T/F)
35. _________________define a set of partitioned name spaces in which classes are stored.
36. The java compiler uses file system directories to store packages (T/F)
37. The package hierarchy must be reflected in the file system of your java development system (T/F)
38. The import statement in java is same as #include in C (T/F)
39. Import statement affects the size of the java class (T/F)
40. ______ is the actual garbage collector method in ___________ class.
41. All java programs are multithreaded (T/F)
42. _____________ methods are called using the class name
43. Casting of objects to classes is possible in java (T/F)
44. We can cast objects to interfaces in java (T/F)
45. Explain casting of objects to classes and casting of objects to interfaces (SQ)
46. Integer and int declaration in a java program are one and the same (T/F)
47. Operator overloading is possible in java (T/F)
48. What is the output of the program, Explain (SQ)
Class EqualsTest {
	Public static void main (String args [])
	{
		String str1, str2;
		Str1="This is a test string";
		Str2 = str1;
		System.out.println ("Result:' + (str1==str2));
		Str2 = new String (str1);
		System.out.println ("Result :"+( str1 == str2));
	}
}

49. ____________ method is used to compare the string values.
50. The declaration String [] names = new String [10] creates a array names with 10 characters (T/F)
51. Arrays are initialized when they are declared (T/F)
52. Argv [0] is same as in C (T/F)
53. (SQ) what is the output of the program:
class EchoArgs {
	public static void main (String args [])
	{
		for (int I=0; I<args.length; I++)
		{
			System.out.println ("Argument:"+I+":"+args [I]);
		}
	}
}

After executing java EchoArgs 1 2 3 jump from the command line.
54. (SQ) What is the error in the program, How do you rectify it :
class SumAverage {
	public static void main(String args[])
	{
		int sum=0;
		for(int I=0;I<args.length;I++)
		{
			sum+=args[I];
		}
		System.out.println("sum is :"+sum);
		System.out.println("Average :"+(float) sum +args.length);
	}
}
55. Constructors can also be overloaded in java (T/F)
56. Once the super class's methods are overridden they cannot be called (T/F)
57. (SQ) Is this valid in a java program :
int total(int arg1, int arg2, int arg3) {...};
float total(int arg1, int arg2, int arg3) {...};
Explain.
58. To use an interface _____________ keyword is used
59. ______________ method is used to add characters to a Stringbuffer.
60. _________ is the concatenation character for strings.

 

APPLETS

1. A single java program can be written to operate as both a java application and a java applet (T/F)
2. Explain how a single program can be written as both a applet and a application (SQ)
3. Applets always run through a browser (T/F)
4. Applets can access the file system of the machine where they are downloaded (T/F)
5. Applets can't communicate with any network servers other than the one that had originally stored the applet (T/F)
6. Applets can run any program on the reader's system (T/F)
7. Applets can't load programs native to the local platform including stored libraries such as DLL's (T/F)
8. Every applet should have main()(T/F)
9. To create an applet, you create a subclass of the class ______________ which is available in __________ package.
10. To run an applet the browser should have _______________
11. A applet cannot run without the init() method (T/F)
12. The parameters are passed to an applet using the ______________ tag of HTML.
13. (SQ) write the HTML tags to run an applet MyApplet.class with a font name and size to be printed.
14. Applets can use System.out.println() method to do simple debugging (T/F)
15. Explain how System.out.println() method be used for debugging the applet (SQ)
16. Explain the difference between geCodeBase and getDocumentbase.
17. _____________ method is used to display text in an applet.
18. ______________ class gives you important information about Fonts.
19. An applet is a Panel (T/F)
20. Applets load images using the applet's _______________ method.
21. Applets can be made multithreaded (T/F)
22. Applets can invoke public methods of other applets on the same page (T/F)

 
AWT  

1. What is awt (SQ)
2. We can create custom components using a _____________
3. Panels group components within an area of an existing window (T/F)
4. Radio buttons are created using the checkbox class (T/F)
5. To create radio buttons you should create an instance of ______________ class.
6. The _________________ determines how AWT components are dynamically arranged on the screen
7. The five basic types of layout managers are ______,____________,_________,_________,________
8. ____________ determine the amount of space between the edges of a Panel and the Panel's components.
9. In java 1.1 event model, each event class has a corresponding _________ interface.
10. If you implement a listener interface, you have to implement all the methods in that interface (T/F)
11. Scrolling panes are new components added in ver 1.1 of java (T/F)
12. ____________ is a platform specific window with a title, a member, close boxes, resize handles and other window features.
13. Explain b.addactionlLstener(this) in an applet if b is an instance of button (SQ)

 
PROTECTION 

1. In ____________ protection, the default level of protection, the methods and variables are accessible to all the other classes in the same package.
2. In ________________ protection the methods and variables are accessible only to other methods in the same class.
3. In ___________ protection the methods and variables are accessible to other methods anywhere inside or outside the current class or package.
4. In ____________ protection the methods and variables are accessible to all classes inside the package, but only to sub-classes outside the package.
5. Private methods are effectively final (T/F)

 
EXCEPTIONS

1. Error handling in java is done with _________________
2. Exception is a concept not a class (T/F)
3. Explain exceptions (SQ)
4. We can use more than one catch() for one try statement in a java program (T/F)
5. The __________ keyword is used to indicate that some code in the body of your method may throw an exception.
6. We can throw objects in exceptions that are instances of subclasses of _______________.

 
MULTITHREADING

1. A thread is a single stream of execution within a process (T/F)
2. (SQ) Explain the two methods of creating threads in java .
3. the _____________ keyword tells java to make the block of code in the method, thread safe.
4. The garbage collector is itself a thread in a java program (T/F)
5. The only method in Runnable interface is ___________
6. What is non-preemptive scheduling (SQ)
7. What is preemptive scheduling (SQ)
8. Windows 95 is a ______________ scheduling operating system
9. We can set the priority of each thread in a multi-threaded java program (T/F)
10. Explain thread priorities (T/F)
11. _________________________ is the static method to get the name of the current thread.
12. Main() is also a thread in every java program (T/F)
13. In a multi-threaded environment ____________ keyword is used to assure the execution of all the threads on the same object (method) without a deadlock.
14. Deadlock is a situation when all the threads are dead (T/F)
15. Threads cannot communicate with each other in a multi-threaded program (T/F)
16. We can synchronize a block of code in multi-threaded java program (T/F)


I/O IN JAVA

1. ___________ is a new class added in java 1.1 for character reading.
2. Inputstream can read data from only files (T/F)
3. Input/output throws _________________ exception.
4. Objects can also be sent through streams (T/F)
5. What is serialization (SQ)
6. We can create input and output streams to network hosts also (T/F)
7. There is no direct method or class to read primitive data types (T/F)
8. We can't create a stream, based on another streams (T/F)
9. The standard input/output objects are present in ____________ class.
10. In the statement System.out.println(), out refers to __________________
11. We can get specific types of files (*.txt, *.exe) using the ________________ interface.
12. The directory can be referred through a java program using the _____________ class.
13.All the input/output are present in ____ class.

 
IMAGING 

1. Java applets can load only two types of image files, they are _________ and ____________
2. ____________ is the method to get the image file from an URL.
3. Graphics class include drawImage() method to draw images (T/F)
4. _______________ clas is used to know the status of the images being loaded in an applet.
5. ______________ is an abstract interface used to get notification as an image is being generated.
6. ______________ is the only method which has to be defined to use the ImageObserver class.
7. Drawing the image completely in the memory and displaying it in the applet is called as double buffering (T/F)
8. A user can create his own image using the ______________ method
9. Explain how flickering can be removed in java graphics applet. (SQ)
10. Java applets support only .au audio file formats for playing music files. (T/F)

 
EVENTS

1. The new event model in 1.1 is called as _____________ event model
2. A applet can be made as its own listener for events (T/F)
3. Special interfaces called ___________ are introduced in java 1.1 for handling events (T/F)
4. AWT components can be handled without mouse (T/F)
5. In java 1.02 event model the _______________ function was responsible for processing all the events in an applet.
6. We can avoid the definition of all the methods once we have implemented a listener, by using special classes called ______________.

 
NATIVE METHODS

1. C, C++ functions cannot be used in a java program as it is itself a different language (T/F)
2. We lose the portability of the java code once we use native function (T/F)
3. Applications support native methods, but applets can never (T/F)
4. JNI stands for _____________________
5. Usage of native methods speeds up the processing speed of a java program (T/F)
6. The header file used for the native methods is created using ____________
7. All the native methods should have the keywords _________ and _____________.

 
CLIPBOARD , DRAG & DROP

1. Java dosen't support cut/copy/paste and drag-and-drop operations (T/F)
2. The data to be cut/copied by an object should implement ______________ and ____________ interfaces.
3. _______________ interface is to be implemented by the components capable of being dragged.
4. ___________ interface is to be implemented by the components capable receiving a drop.

 
JDBC

1. JDBC stands for ______________________
2. SQL stands for __________________
3. ODBC is a technology of Microsoft (T/F)
4. ODBC is not appropriate for direct use from jaa because it uses ___________ interface
5. ODBC can be used from jaa in the form of ______________ bridge.
6. Three-tier model of database access is considered better than two-tier database access (T/F)
7. (SQ) Explain two-tire and three-tire database access models.
8. Drivermanager.getConnection() returns a _____________
9. (SQ) what is JDBC URL
10. The method Class.forName() does the loading of _________________
11. The registered list of drivers can be manipulated in the _____________ file.
12. _____________ function is used to create a statement.
13. DSN stands for ___________________
14. In the url jdbc:odbc:fred, fred is a ___________________
15. _______________ file in windows directory has the list of all the DSN's
16. without creating a DSN we can directly connect to a database (T/F)
17. java cannot connect to personal oracle database (T/F)
18. _______________ function is used to run a SQL query
19. executeQuery() returns ___________________
20. DDL stands for _____________________
21. DML stands for ____________________
22. We cannot use %. _ characters in a SQL statement in java's JDBC program (T/F)
23. Resultset maintains a ___________ internally
24. ________________ method is used to create a SQL statements without actual values.
25. PrepareStatement() returns ______________ object
26. _________ character indicates the placeholder for each IN parameter in prepareStament
27. A preparedStatement cannot be directly executed (T/F)
28. ____________ method is used to supply values to the ?'s in a preparedStatement
29. Stored procedures reside at the client location (T/F)
30. ____________ is used to call a stored procedure
31. Even if a database dosen't support a store procedure java can call one (T/F)
32. How do you call a stored procedure in java (SQ).

 
RMI

1. RMI stands for ______________________
2. CGI stands for ______________________
3. Networking programming using socket, serversocket is same as RMI (T/F)
4. RMI programs can call methods which are not present in the local machine (T/F)
5. In a RMI program only a server can call remote methods of clilent (T/F)
6. All remote objects throw ______________ exception if any error occurs.
7. The default RMI port is ____________
8. The remote object must export itself to make itself available to the world with ______________ method.
9. A remote method object cannot directly call a remote method, it is done through ___________ at client side.
10. The target methods at the serer end are called through a special object called ___________
11. ___________ command is used to generate stubs and skeletons.
12. In Windows 95 environment _____________ command is used before running any RMI program.

 
SERIALIZATION

1. What is serialization (SQ)
2. The ability of an object's data to live on after the object has been destroyed is called as object's ____________
3. Objects cannot be deserialized in any manner (T/F)
4. Casting should be done while deserializing objects (T/F)
5. ______________ is the method used to read a object from an ObjectInputStream.
6. Objects cannot be passed through network streams created on sockets, serversockets (T/F)
7. The process of sending objects from one place to another on the network is called as RMI (T/F)
8. Any class which has to be serialized should implement _____________ interface.
9. _____________ keyword can be used with a object declaration to avoid serialization.
10. Serial objects can also have versions (T/F).

 
REFLECTION

 1. Without knowing a class method we can execute it (T/F)
2. _____________ part of objects depend on reflection.
3. We cannot know the interfaces which a class implements (T/F)
4. Classes should explicitly provide information to facilitate reflection (T/F)
5. We have a method of avoiding other classes using reflection on our methods and classes (T/F).

 
JAVA AND CORBA

 1. CORBA stands for _____________________
2. CORBA is a new programming language like java (T/F)
3. OMG stands for ________________________
4. COM stands for ______________________
5. COM is a concept developed by Microsoft (T/F)
6. Microsoft is not a part of CORBA group (T/F)
7. Using CORBA different objects in different languages can communicated together (T/F)
8. IDL stands for _____________________
9. ORB stands for ____________________
10. DCOM is another name for CORBA (T/F) .

 
JAVA BEANS AND OTHER

1. JFC stands for _________________
2. The ___________________ feature of java beans is same as reflection.
3. Java beans use the same ___________ event model as java 1.1
4. Java beans cannot be created as writing any java application (program) (T/F)
5. ActiveX objects are same as java beans (T/F)
6. ActiveX objects cannot be used in java beans as the technologies are different (T/F)
7. We can create an ___________ object in visual basic 5, same as java bean.
8. Bean is same as any other class (T/F)
9. Bean exposes its functionality to the outside world through ______________
10. (SQ) what are the minimal requirements for a java class to be calles as a bean.
11. All the methods in a bean should start with get and set only (T/F)
12. Beans are always packed like files being zipped (T/F)
13. JAR stands for __________________
14.Beans can also be developed as forms in visual basic 5 (T/F)
15. To create beans you should hava a ___________ kit installed.
16. Servelets are applets at the ____________ side.

 
JAVA UTILITIES

1. _____________ is a data structure which implements first in, first out method for element storage and retrieval.
2. There is a readymade stack class available in java (T/F)
3. A _________ class in java is like a growable array of object references.
4. A Dictionary class in java is a built-in standard English dictionary (T/F)
5. _____________ means the division of text into a set of tokens, which in a certain sequence can convey a semantic meaning.
6. _______________ class is used to create a string with delimiters for parsing.
7. More than one delimiter character can be specified in a StringTokenizer class (T/F)
8. _____________ method is used to extract next consecutive token from a string .
9. The ___________ class is used to generate a sort of pseudo-random numbers.
10. We can get more than one type of random number from a random class (T/F)
11. Arraycopy() method is present in the String class (T/F)
12. A dictionary is an abstract class which represents a _____________ storage repository.
13. Hashtable and dictionary are one and the same (T/F)
14. Integer, Character, Boolean are called as _____________ classes.



Up
Hosted by www.Geocities.ws

1