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

How does jpa repository work?

877


What is jar file in java?

932


Explain daemon thread.

924


Which framework is best for rest api java?

907


What is exe file in java?

924


Is jprofiler open source?

859


How do I open java console?

872


Which is faster c++ or java?

887


How do I know if I have jre or jdk?

851


What is meant by pass by reference and pass by value in java?

869


Are there tuples in java?

912


What is the resourcebundle class?

866


Do I really have to type in the programs in the book to try them out?

965


How do I open the java control panel?

874


Please can anybody explain what exactly "the project architecture" means???

2164