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
How do I find jre version?
Which method is used to create the daemon thread?
How do I install java on windows?
How do you check if java is installed on windows command prompt?
What is native api in java?
Is java installed on windows 10?
How can I swap two variables without using a third variable?
What is data persistence in java?
If you’re overriding the method equals() of an object, which other method you might also consider?
What's the difference between code-based security and role-based security? Which one is better? : java security
What is mdb in java?
What is a driver in java?
Are there tuples in java?
What is jndi datasource in java?
Which version of jdk is required for netbeans 8.0 2?