Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a code in jsp to swap two numbers?

Answer Posted / ritesh prabhu

<%@ page language="java" %>
<html>
<head>
<TITLE>Swap Numbers </TITLE>
</head>
<body bgcolor="#9999FF" >
<FONT SIZE=4 COLOR=white><U>Program to Swap 2
Numbers</U></FONT><BR>
<%
int i=1;
int j=2;
out.print("<FONT SIZE=3 COLOR=white>");
out.println("Before swapping i="+i+" j="+j);
out.println("<br>");
int temp=i;
i=j;
j=temp;
out.println("After swapping i = " + i + " j = " + j);
out.print("</Font>");
%>
</body>
</html>

Is This Answer Correct ?    33 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is class path in java?

864


What is java ioc?

815


What is jndi datasource in java?

842


What is java net url?

781


What happens if javac is not recognized?

815


What is stateful in java?

899


Why do we need framework in java?

792


What is jpa project?

824


What is jpa entitymanager?

850


When do we go for java 8 stream api? Why do we need to use java 8 stream api in our projects?

910


What is javabeans api?

826


What is transient in java?

825


Which is more secure: java or activex? : java security

881


Why struts framework is used in java?

856


What is lambda expression in mvc?

920