Core & Advance Java Lab
Lab Code: MCA-256
Simple classes and methods:Q1. Write a program to print Hello Java.
Q2. Write a program to find the area of a room using two classes.
Q3. Program that calculates and prints the simple interest using the formula: simple
interest=PNR/100 Input values P, N, R should be accepted as command line input as below,
e.g. java Simple interest 5 10 15
Q4.Write a program to find the greatest of the following numbers:
325, 712, 478
Array implementation:Q5. Write a program to tell that how many numbers are evens and odds in the followings:
50, 65, 56, 71, 81
Q6. Write a program to sort the following numbers in ascending orders.
55, 40, 80, 65, 71
Q7. Write a program to print a pattern like:
1
2
Command line arguments:Q8. Write a program to implement command line arguments.
String implementation:Q9. Write a program to arrange the following words in dictionary order.
Madras, Delhi, Ahmadabad, Calcutta, Bombay
Implementation of constructor & method overloading, overriding, nesting:Q10. Write a program to find the area of a room using Constructor.
Q11. Write a program to implement methods overloading.
Q12. Write a program to implement static keyword.
Q13. Write a program to implement nesting of methods.
Q14. Write a program to implement overriding of methods.
Inheritance:Q15. Write a program to implement single inheritance.
Q16. Write a program to implement multiple inheritance.
Package:Q17. Write a program to create your own package and use that package in another program to
print Hello package.
Multithreading:Q18. Write a program to implement multithreading using the system function like yield(),
stop(), sleep().
Q19. Write a program to implement multiple try/catch statements.
Applet programming:Q20. Write a program to print Hello Java using applet programming.
File Handling:Q21. Write a program to copy the content of one file into another using character stream
classes.
Q22. Write a program to copy the content of one file into another using byte stream classes.
Java Networking:Q23. Write a program to find the IP address of a Local machine.
Q24. Write a program to find the IP address of a Remote machine.
Q25. Write a program to find the protocol, port number, host name, file name from a URL
address.
Java Database Connectivity:Q26. Create a Java application to insert data in the product table using the Statement object.
Q27. Create a Java application to execute a stored procedure that retrieves and displays the
information from the customer table.
Java RMI and Java Beans:Q28. Write a program to implement Java RMI.
Q29. Write a program to create a simple java bean.
Java server & JSP:Q30. Write a program to create a web page using Java server programming.
Q31. Write a program to create a web page using JSP.