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 / vishal

<%@ page language="java" %>
<html>
<head>
<TITLE>Swap Numbers </TITLE>
</head>
<body bgcolor="red" >
<FONT SIZE=4 COLOR=white><U>Program to Swap 2
Numbers</U></FONT><BR>
<%
int a=1;
int b=3;
out.print("<FONT SIZE=3 COLOR=white>");
out.println("the number is swapping "+a+"+b);
out.println("<br>");
int b=a+b;
int b=a-b;
int a=a-b;

out.println("the swapped number is a = " + a + " b = " + b);
out.print("</Font>");
%>
</body>
</html>

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is php faster than java?

813


What is predicate in lambda expression?

769


I am trying to create a new universal user group. Why can't i? : java security

869


Where are group policies stored? : java security

786


For each of the following program segments,give a big zero analysis for the running time 1.For (i=0;i

1876


Where is java installed?

820


What does @override mean in java?

883


What are jpa annotations?

853


What is hql in java?

821


What is jpa used for?

894


What is the front end for java?

910


What is meant by java se?

880


What is the difference between a jdk and a jvm?

852


What is stateless class in java?

887


Is java secure? : java security

963