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 adoptopenjdk?

958


What is gwt in java?

961


What is entitymanager in java?

1084


What is jdk for netbeans ide?

1104


What is proxy object in java?

1207


What is java persistence api used for?

988


What does persist mean in java?

1050


What about products that claim to block java applets at a firewall? : java security

994


What's the difference between local, global and universal groups? : java security

989


What is the use of servlet in java?

1004


Is openjdk the same as jdk?

959


What is dto in java?

964


How do I run a java program from the command line?

1030


How can I swap two variables without using a third variable?

1030


What is loose coupling in java?

932