How Many Types Of Java Application
Mainly 4 Types Of Java Applications that can be created Java Programming Languages . These are :
- Standalone Application
- Web Application
- Enterprises Application
- Mobile Application
Standalone Application : It is also known as desktop application or window-based application. An application that we need to install on every machine such as media player, antivirus etc. AWT and Swing are used in java for creating standalone applications.
Example Program :
import java.awt.*;
public class ExStand
{
Frame f;
public ExStand()
{
f = new Frame("This is Example Program for Standalone Application");
f.setLayout(new FlowLayout());
f.setSize(300,400);
f.setVisible(true);
}
public static void main(String args[])
{
new ExStand();
}
}
Web Application : An application that runs on the server side and creates dynamic page, is called web application. Currently, servlet, jsp, struts, jsf etc. technologies are used for creating web applications in java.
Example Program :
<%--
Document : Home
Created on : Nov 17, 2017, 12:04:05 PM
Author : Balwant
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Web Application Example Tutorials</title>
</head>
<body>
<div id="middlecontent">
<h1 align="center">Web Application Example</h1>
</div>
<div id="footer">
<p align="center">Web Application Example Tutorials</p>
</div>
</body>
</html>
Enterprises Application : An application that is distributed in nature, such as banking applications etc. It has the advantage of high level security, load balancing and clustering. In java, EJB is used for creating enterprise applications.
index.jsp
<html>
<head>
<title>Enterprises Application Example</title>
</head>
<body>
<form action="\getUser" method="post">
User Name <input type="text" name="userid"> <br />
<input type="submit" value="submit">
</form>
</body>
</html>
handler.java
public class User
{
private String user = null;
public void setuser(String n)
{
user = n;
}
public void getUser()
{
return user;
}
}
Mobile Application : An application that is created for mobile devices. Currently Android and Java ME are used for creating mobile applications.
activity_main.xml
<?xml version="1.0" encoding="utf-8" ?>
<RelativeLayout
xmlns:android:"http://schemas.android.com/apk/res/android"
>
<TextView
android:text = "Example of Mobile Applications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</RelativeLayout>
MainActivity.java
public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
If this information is important to you , and you want to , I will continue writing some more details of Android Programming Language, so click on the advertising, available on this page. This is motivate me for writing some more useful stuff, Thank's
Comments
Post a Comment