MySrv.java: import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Http...
Read More
Practical 21: Write a program to demonstrate the use of HttpServlet as a parameterized Servlet
1) Develop servlet program to print Hello MSBTE in browser window. Program: import javax.servlet.http.HttpServlet; import javax.servlet....
Read More
Practical 20: Write a program to update and delete a record from a database table.
Database: Program to Update: import java.sql.SQLException; import java.sql.Statement; import java.sql.DriverManager; import java.s...
Read More
Practical 19: Write a program to demonstrate the use of Prepared Statement
Database: Program Prepared Statement: DynamicUpdateApp.java : import java.sql.Connection; import java.sql.PreparedStatement; import ...
Read More
Practical 18: Write a program to insert and retrieve the data from database using JDBC
Database: Program to insert data: // Program to Insert Data into Database import java.sql.Connection; import java.sql.DriverManager;...
Read More
Practical 12: Write a program to demonstrate the use of JTextField and JPasswordField using Listener Interface
1) Write a program using JPasswordField to set the password character as '#' instead of '*' import javax.swing.*; import ...
Read More
Practical 11: Write a program to demonstrate various mouse events using MouseListener and MouseMotionListener interface
1) Write a program to change the background color of Applet when user performs event using Mouse. import java.awt.*; import java.applet.*...
Read More
Practical 10: Write a program to demonstrate status of key on Applet window such as KeyPressed, KeyReleased, KeyUp, KeyDown
1)Write a program to demonstrate status of key on Applet window such as KeyPressed, KeyReleased, KeyUp, KeyDown import java.awt.*; import...
Read More
Practical 16: Write a program to implement chat Server using ServerSocket and Socket class.
1) Write a program to check credentials of users (Client will send user id and password to server and server will authenticate the client u...
Read More
Practical 15: Write a program to demonstrate the use of URL and URLConnection class and its methods
1) Write a program using URL class to retrieve the host, protocol, port and file of URL http://www.msbte.org.in Ans: import java.net.URL...
Read More
Practical 14: Write a program to demonstrate the use of lnetAddress class and its factory methods.
1) Develop a program using InetAddress class to retrieve IP address of computer when hostname is entered by the user. Ans: import java.ne...
Read More
Practical 13: Write a program to demonstrate the use of Window Adapter class.
Program: import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JFrame; import javax.swing.JLabel; imp...
Read More
Practical 9: Write a program to launch a JProgressBar
1) Write a program to demonstrate the following output: Ans: import javax.swing.*; import java.awt.*; public class JProgresBarDemo {...
Read More
Practical 8: Write a program to create a JTable.
1) Develop a program to demonstrate the use of JTable. Ans: import javax.swing.*; import java.awt.*; import javax.swing.table.*; public ...
Read More
Practical 7: Write a program to create a Jtree.
1) Write a program to demonstrate the use of tree component in swing Ans: import javax.swing.*; import javax.swing.tree.*; import java.a...
Read More
Practical 6: Write a program using swing to display a ScrollPane and JcomboBox in an Japplet with the items - English, Marathi, Hindi, Sanskrit.
1) Write a program code to generate the following output Ans: import javax.swing.*; import java.awt.*; import java.awt.event.ItemEven...
Read More
Practical 5: Write a program using AWT to create a menu bar where menubar contains menu items such as File, Edit, View and create a submenu under the File menu: New and Open
Program: import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; im...
Read More
Practical 3: Write a program to design simple calculator with the use of GridLayout
1) Write a program to demonstrate Grid of 5 * 5 Ans: import java.awt.*; public class GridDemo { public static void main( String args[] ...
Read More
Practical 2: Write a program to design a form using the components List and Choice.
1) Write a program to display following output: Ans: import java.awt.*; public class ChoiceDemo { public static void main(String ...
Read More
Practical 1: Write a program to Demonstrate the use of AWT Components like Label, Textfield, TextArea, Button, Checkbox, RadioButton and etc.
1) Design a applet/application to demonstrate the use of Radio Button and Checkbox. Ans: import java.awt.*; import java.util.*; public c...
Read More
Practical 7: Write program and design test cases for the following Control and decision making statement. 1) For..loop 2) Switch..Case 3)Do...While 4)If..else
Program: <html> <head> <script type="text/javascript"> function display() { console.log("...
Read More
Subscribe to:
Posts (Atom)