You are on page 1of 11

IT207 PROGRAMMING IN JAVA L T P C

2023
PURPOSE
The Java programming language has become the de facto standard as the language to be used for
internet applications. The main purpose of this course is to provide a platform for learning Java and
develop some web based applications.

INSTRUCTIONAL OBJECTIVES
This course enables the students to
• Understand the need for new language environment for internet applications
• Effectively use the huge library routines while solving problems.
• Handle exceptional situations and to access data on external medium.
• Make use of Java Utilities for Documenting, Debugging your Programs and Packing your Programs into
Modules.
• Understand why certain language features have been left out in Java and the way Java System is
implemented.

UNIT I FUNDAMENTALS OF JAVA 7


Java Buzzwords; C++-- Data types; Operators; Expression; Control Statements; Operators Precedence &
Associativity; Associativity; Scoping rules; Automatic Type Conversion & Type Casting; Arrays; instanceof
operator.

UNIT II CLASSES AND OBJECTS 8


Entry point for Java Programs; Classes; Methods & Method Signatures; Method retuning Values;
Method Overloading; Overloading on Returning Values; Method call mechanism; Passing & Returning
Objects; Static Binding; Constructors; Default Constructor; Garbage Collector; finalize() method; String &
String Buffer; valueof() & toString() method; Incremental Compilation; Explicitly Invoking garbage
collector & finalize() method; free floating blocks;

UNIT III INFORMATION HIDING AND REUSABILITY 13


Packages; Default Package; Package Constraints; Path & Class Path Environment Variables; Access
Specifiers – Private, Protected, public, package level access; Importing Packages; Inheritance; Object
class; this & super keyword to resolve ambiguity; Constructor calls; method overriding; Storage
Specifiers – static & final, use of transient & volatile; Abstract class & Interface; Multiple Inheritance in
Java; Extending interface; Program Execution Flow; Polymorphism; Late Binding; Upcasting & Down
Casting; Wrapper class; Nested class & Interface; native method; comparison of JAVA & C++.

UNIT IV EXCEPTION, CONCURRENCY, AND STREAMS 9


Exception Handling mechanism; Checked & Unchecked Exceptions; User defined Exception; Default
Exception Handlers; Input & Output Streams; byte stream & character stream; Getting user input;
stream tokenizer; Serialization; Threading – Thread class & Runnable Interface; Inter Thread
Communication; synchronized keyword; Deadlock; volatile keyword.
UNIT V JAVA APPLETS 8
Applet Basics – status window – HTML applet tag – passing parameters – event classes – event listener
interfaces – adapter classes.
TOTAL 45
TEXT BOOK
1. Joe Wigglesworth, Paula Lumby, “Java Programming – Advanced Topics” , Thomson
Asia, 2000.

REFERENCE BOOKS

1. Deitel & Deitel, “Java How to Program”, Prentice Hall,5th Edition ,2002
2. Ken Arnold & James Gosling, “The Java Programming Language”,AWL,2000.
3. Peter Haggar, “Practical Java: Programming Language Guide” , Addison-Wesley Pub Co,1st
Edition,2000.
4. Artgittleman, “Ultimate Java Programming” Willey Greentech, 2003.
5. Bruce Eckel, “Thinking in Java”, Pearson Eduction Asia, 2nd Edition, 2000.
6. Patric Naughton & Herbert Schildt, “The Complete Reference Java 2”, TataMcgraw Hill, 2001, 4th
Edition.

*************************************************************

UNIT – I

PART – A

1. What is the task of main method in a java program?


2. What is a token? List out the types of tokens supported by java.
3. Why can’t we use a keyword as a variable name?
4. Enumerate the rules for creating identifiers in java.
5. What are the 2 types of Java programs?
6. What are command line arguments? How are they useful?
7. List out the 8 basic data types used in java. Give an example.
8. What is a scope of a variable?
9. What is type casting?
10. What is a conditional operator or ternary operator?
11. List out the operators available in java.
12. What is type conversion?
13. What is the difference between WHILE and Do-While loop?
14. What is the difference between the keyword ‘break’ & ‘continue’?
15. What is an array?
16. How will you represent a multidimensional array in java?

PART – B

1.Explain in detail about Java Buzzwords (or) Java features (or) characteristics.
2. Explain in detail about Control Structures available in java.

UNIT – II

PART – A

1. What is a class? How does it accomplish data hiding?


2. How do classes help us to organize our programs?
3. What are objects? How are they created from a class?
4. What is a constructor? What are it’s special properties?
5. How do we invoke a constructor?
6. What is meant by constructor overloading?
7. What is meant by method overloading?
8. What is a default constructor?
9. What is a parameterized constructor?
10. List down the access specifiers available in java.
11. How will you invoke a member function?
12. What are the two ways to pass arguments in java?
13. How will you return objects from a member function?
14. What is the use of finalize() method?
15. What is the use of Garbage collector in java.
16. How does String class differ from the string buffer class?
17. List out any 5 methods available in string class
18. List out any 5 methods available in string buffer class
19. What is the use of valueOf() method?
20. What is the use of toString() method?
21. How will you convert numeric strings to primitive numbers using parsing method?

PART –B

1. Explain method overloading with an example program


2. Explain in detail about constructor overloading with an example
3. Explain about String class, String constructor, and different String methods using a program.
4. Explain about StringBuffer class, StringBuffer constructor, and different StringBuffer methods using a
program.
5. Explain in detail about explicitly invoking garbage collector and finalize() method?

UNIT – III

PART – A

1. What is an interface? Give its syntax.


2. How will you extend one interface by other interface?
3. How will you implement the concept of multiple inheritance using interfaces?
4. How does java know that the class we create implements a particular interface?
5. Differentiate class and interface
6. List out the similarities between interfaces and classes.
7. What is inheritance? How does it create new classes?
8. Describe different forms of Inheritance in java with examples.
9. Give the syntax of Single inheritance, Multilevel inheritance, and Hierarchical inheritance.
10. What is a Package?
11. What is the default package in java? Give its syntax.
12. How do we add a class or an interface to a package?
13. How will you protect a class from accidental access?
14. What is an object class?
15. When is a class or method declared as ‘final’?
16. When is a class or method declared as ‘abstract’?
17. How is a superclass constructor or method invoked?
18. When is a member of a class declared as ‘static’?
19. Compare and contrast overloading and overriding methods.
20. Define Polymorphism. What are the different types of polymorphism?
21. What is Dynamic method dispatch or run rime polymorphism?
22. List out the different levels of access protection in java.
23. How do we declare a nested class? Give an example.
24. What is a wrapper class? What are its applications?
25. What is meant by ‘Late binding’?

PART – B

1. How is interface used to support multiple inheritance? Explain with a program.


2. Describe the various levels of access protection available in packages and their implications with an
example program.
3. Explain in detail about creating and accessing packages with an example program.
4. Explain ‘Dynamic method dispatch’ with one example program.
5. Describe Method overriding. Explain it with an example.
6. Write short notes on:
i) Upcasting
ii) Downcasting
7. Explain in detail about different types of Inheritance with an example program.
8. Compare and contrast Java and C++.
9. Explain in detail about Wrapper classes with an example.
10. Explain about Native methods with suitable examples.

UNIT – IV

PART – A

1. What is an Exception?Draw the hierarchy of Exception.


2. What is the use of try and catch block?Give its syntax.
3. Define ‘Exception handling mechanism’.
4. List out the common types of exceptions in java.
5. Is it essential to catch all types of exceptions?
6. How many catch blocks can be used with one try block?
7. What is the use of ‘finally’ block? Give an example.
8. Why subclass exception should precede the superclass exception?
9. Define checked and unchecked exception.
10. What is the function of default exception handler?
11. List out the advantage and disadvantage of default exception handler.
12. What is a stream? Draw the hierarchy of stream class.
13. Distinguish between Input stream and reader classes & Output stream and writer classes.
14. What is a Thread? Which Interface must be implemented by all threads?
15. What are the ways to create a thread?
16. Describe the complete life cycle of a Thread.
17. How will you start and stop a thread?
18. How do we set priorities for threads?
19. What is synchronization? When it is used?
20. What is a Deadlock ? What are the ways to avoid deadlock?

PART – B

1. Explain in detail about Exception Handling Mechanism with an example.


2. Explain different ways to create threads with an example.
3. Explain the InputStream class hierarchy with an example program.
4. Explain the OutputStream class hierarchy with an example program.
5. Explain the Reader Stream class hierarchy with an example program.
6. Explain the Writer Stream class hierarchy with an example program.

UNIT – V

PART – A
1. What is an applet?
2. Differentiate local and remote applets.
3. How applets differs from application programs?
4. What are the different ways of running an applet?
5. Why the applet classes are declared as public?
6. List out the different stages in the life cycle of an applet.
7. Distinguish init() and start() methods.
8. Write a program to set the foreground and background color using applet.
9. What is an Event?
10. Write short notes on Event Handling mechanism.

PART – B

1. Explain in detail about Applet Life cycle.


2. Write a program to demonstrate the Life cycle of an applet.
3. Write a program to perform the following operations by using applet.
(i) Draw a Line,Rectangle
(ii) Draw a oval and fill it
(iii) Draw a polygon
(iv) Set the background and foreground color.
4. Explain in detail about Event handling mechanism with an example.
5. Describe about ‘Key Event’ and ‘Mouse Event’.

web tech+++++++++++++PART A
1. What is HTML?
2. List the various categories of HTML tags
3. Differentiate container and standalone tags.
4. What are global attributes? List some of them.
5. What are Event handlers? List some of them and when they are triggered?
6. List the tags that can be placed between and tags.
7. Define tag and its attributes.
8. Define tag and its attributes.
9. Write sample code to refresh a given html page with another within 5 seconds.
10. What is client-pull technique?
11. Define tag and its attributes.

Question bank: Internet and Web Technology

1. Discuss the various methods available for connecting to Internet?

2. What is the difference between Client server mode and peer to peer network?

3. What do you understand by Domain Name System? Discuss the architecture and functionality
of DNS in detail.

4. How IP addressing is done? Discuss the various IP address classes in detail.

5. Discuss the TCP/IP model and its services in detail.

6. What o you understand by OSI reference model? Explain briefly advantages of layered
approach?

7. What do you understand by web Server? Discuss its functionality in detail.

8. What is the difference between following?

a. Paired tag and Singular tag


b. Absolute URL and relative URL

9. Discuss the difference between Static and Dynamic IP


10. Discuss briefly following terms:
a. Internet Server
b. Internet Service Provider
c. Internet Access Provider
d. Gateway
e. UDP
f. TCP
g. Telnet
h. FTP
i. E-Mails
j. Ping
11. What is the W3C and what does it do?
12. What is HTML validation? Do you ever validate your HTML? Why?
13. What are the factors we need to keep in mind while designing website for the
client.
14. Explain OSI in detail?
15. What is HTML?How is HTML interpreted?
16. What is the difference bet
17. Develop HTML code for the following :
a. How do I add midi music to my web page
b. How do I make a picture as a background on my web pages?
c. How do I make it so that someone can mail me by just clicking on text?
d. How do I add floating text to my page?
e. How to add multiple colour text to a webpage?
f. How to make a hyperlink on a picture
g. How can I make my link not have this ugly border?
h. How to align pictures on a webpage?
i. How to make a link to another webpage
j. How to create links to sections on the same page in HTML.
k. Opening new web page window when clicking on a link.
l. Creating a new window in HTML for a single image.
m. How do I create multicolor links in HTML?
n. How to create a fixed background image on a web page.
o. Creating a web page with a single background image not a tiled background. 8 Can a HTML
document be one long line of tags and still be valid.
p. Can HTML tag-pairs be nested inside each other? Explain with example.
Demonstrate a link from one page to specific point in another page.

18. Provide short answers for following:

a. Can a page include more than one set of script tags?


b. What is the software required to create and edit JavaScript programs
c. How data is stored in a JavaScript?
d. How browsers recognize JavaScript code?
e. What is the difference between Java and JavaScript?
f. Can we use HTML tags with JavaScript?
g. How to insert comments in a JavaScript?
h. A script that executes when the user clicks the mouse button is called?
i. What is the purpose of enclosing a script with in html comments?
j. What you understand by local and global variables?

19. Which of the following is not a valid JavaScript variable name?


a. 2names
b. _first_and_last_names
c. firstandlast

20. What will be the result of the JavaScript expression 31 + “ angry polarbears”
21. Why we need to use Boolean variables?
22. Discuss data types in JavaScript?
23. Following statement is an example of which kind of error?
While (3==3)

24. What do you understand by an Object? Discuss properties ,values and methods of a Object
with Date as an example
25. Can one of an Object’s properties be another object?
26. Math object have constant properties. Discuss them.
27. Discuss some objects that can not be used with the new keyword.
28. Generate a JavaScript to generate 5000 random numbers.
29. Which object can be used to load a new URL into the browser window?
30. What is the information stored in a navigator object?
31. Which Object’s properties contain URL of the current document?
32. Discuss the JavaScript’s browser object hierarchy in detail?
33. Use JavaScript for developing scrolling messages?
34. How to close browser window with a JavaScript?
35. How to adjust width and height of an Image in HTML?
36. How to differentiate between Local and Global variables in java Script.
37. Discuss basic data types available in JavaScript?
38. Discuss briefly advantages of using java script as Client scripting language?
39. Discuss the functions associated with a string object in JavaScript?
40. What does the statement if (fig==1) do in JavaScript?
41. What is the function of ‘+’ sign in case of JavaScript?
42. What is the difference between Local and Global variables in case of JavaScript? Do we need
to explicitly declare every variable?
43. What is the use of NOSCRIPT tag?
44. Discuss the various kinds of loops available in JavaScript?
45. How condition checking performed in JavaScript explain with examples.
46. What is the difference between Alert box and Prompt box in JavaScript?
47. Discuss with examples functions explicitly provided by JavaScript for type conversions
48. How to generate Image Map in HTML? What is its use?
49. Demonstrate a succession of links that re-use the same additional window.
50. How will you develop a scrolling option in a frame? Also show the script for allowing the
user to resize the frame.

Web ++++++++++++++++

You might also like