Monday 14 November 2011

how to develop logic in java programming Language

how to develop logic in java programming Language
Java programming logics with Examples question model.by solving below questions you can develop logic in java.
1) What will happen, if main ( ) function is defined as private ?
2) "Package statement is always the first non-comment statement in Java". Stale true/false and justify.
3) What is ClassPath ?
4) List any 4 layout managers available in Java.
5) Write syntax of for loop for "for each" style.
2. a) Write an applet to simulates a traffic signal light with short delay between
states. 8
b) Explain JDBC drivers. 7
3. a) Explain object serialization. Write a program to copy the contents of one file
into another file. Accept file names using command line arguments. 8
b) Explain Servlet life-cycle. 7
4. a) Write a Servlet for e-mail registration with user id, password, name, dob. address
fields. Validate user id. If any user exist with same user id give proper message. Otherwise welcome user with message containing his/her user id and password.        10
b) Differentiate between function overloading and overriding. 5
5. a) i) Write a Java Socket program that runs on client and sends a message to
server at port 8080. The program should display appropriate message returned by server.
ii) Write a Java Socket program that runs on server at port 8080. which accepts
a message from client and send the same string lo client by changing the
case. ! 0
b) Explain Delegation Event Model in Java. 5
6. Write short notes on any 3 : 15
1) Thread synchronization
2) Autoboxing and Unboxing in Java
3) EJB Types
4) Finally clause in Exception Handling.

Java Programming Interview questions with model paper

Java Programming Interview questions with model paper
Java Programming Interview questions with model paper
I. Answer the following with justification.
1) Interfaces cannot be extended.
a) True b) False
2) Import statement is always the first non-comment statement in Java program file.
a) True b) False
3) Which of the following interfaces does not have any method or member variable.
a) Serializable c) Runnable
b) Comparable d) Cloneablc.
4) A catch clause may catch exceptions of which type ?
a) Throwable Type c) Exception Type
b) Error Type d) Siring Type
5) The doCret () and doPost () methods are of HTTP servlet class,
a) True b) False

a) Write an applet to display scrolling text from right to left in an applet window,
using Thread. Text should be accepted by HTML parameter.
b) Explain session tracking in servlet. 7
I. a) Differentiate between Byle stream and character stream. Write a program to merge two files into third file.
 Accept file names using command line arguments. (Use Byte Streams).
b) Explain steps involved in RMI application with example.




4. a) Wrilc a servlet to accept students information from HTML page, and store the
details in a database.
(Note : Take suitable fields, student table is already present), b) Explain the scopes of access specifiers in Java.

5. a) i) Write a Java Socket program that runs on client and sends a file name to
server at port 8000. The program should display appropriate message returned by server.
ii) Write a Java socket program that runs on server at port 8000, which accepts a
file name from client and checks file exists or not and returns proper message
to client. I
b) Explain Inner class with example.
6. Write short notes on any 3 :
1) EJB Architecture.
2) Adapter classes.
3) Layout managers.
4) Class Object in Java.

Java Programming 2005 - Pattern | New | Mca Pune university

Java Programming 2005 - Pattern |  New | Mca Pune university
  Java Programming (2005 - Pattern) (New).
Java Programming 2005 - Pattern |  New | Mca Pune university question papers.
1. Solve the following : 10
a) What is Inet Address ?
b) How to instantiate Httpsession object ?
c) Differentiate between abstract and final keywords.
d) What is connection pooling ?
e) List different types of EJB.

2. a) Write server side socket program to accept file name from client. Server will
reverse the contents and send as response.
b) Write client side socket program to accept filename from user and send to
server. Display the response received from server.
3. Write an applet application which will display colours in list box and a scrolling banner which scrolls to right. When user selects any colour from list, change the colour of scrolling banner ?
4. Write a RMI application to do the following :
' Client will accept a string from user and communicates to the server. Client will invoke find vowel count - remote method on server, using accepted string and display vowel count from that string.
Write all required classes or interfaces.


5. Accept mobile HANDSET details through HTML page. Pass the accepted details to servlet. Servlet will insert record in HANDSET table with values received from HTML page. Servlet will send response as whether record is inserted or not. Assume suitable table structure.
6. Write notes on (any 3) : a) Java. io. File class b) Thread life cycle c) Session tracking in servlets d) EJB architecture.