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

Can a dead thread be started again?

1122


Which class is the superclass of every class?

1023


What about javascript? : java security

1023


Which version of my browser should I use? : java security

956


What is javabeans api?

903


What about 'hostile applets'? : java security

925


What is the difference between lambda expression and anonymous methods?

936


What is difference between loosely coupled and tightly coupled in java?

859


What is a static method?

1025


What is java ioc?

885


What is the purpose of jdk?

929


What is type inference? Is type inference available in older versions like java 7 and before 7 or it is available only in java se 8?

920


How do I run a project in netbeans?

945


What is the resourcebundle class?

939


What is transactional in java?

1039