Java Blog

 
 
 
import java.awt.*;
import java.applet.*;

public class passingPara extends Applet
{
       String str;
       int a,b,result;

      public void init(){
             str=getParameter(\"a\");
            a=Integer.parseInt(str);
            str=getParameter(\"b\");
            b=Integer.parseInt(str);
            result=a+b;
            str=String.valueOf(result);
        }

    public void paint(Graphics g){
          g.drawString(\" Result of Addition is : \"+str,0,15);
    }
}

    Related Post:
  1. program which takes a long sentence from the client passes to the server,server separates out each word and sends them back to client in reverse order

  2. Program to show an example of using initialization block to initialize the data members of a class

  3. Program to determine the sum of the following harmonic series for a given value of n

  4. Program to show an example of using constructors in a class to initialize its data members

  5. RMI based application for login validation based on data saved in text file stored on the server and will display appropriate message to the client..

  6. Write a class whose objects holds a current value and have a method to add that value, printing the new value

  7. Program to print a string on Standard Output Device

  8. Program to read input from the Standard Input Device

  9. Program to show an example of creating String objects from Character Arrays

  10. Program of an applet to illustrate BarChart

  11. Program to extract a portion of a character string and print the extracted string

  12. CORBA program for displaying the date and time of the server machine, client machine and the difference between these two date and time

  13. An applet program that creates string dynamically and displays it

  14. An applet program to display moving banner

  15. Program to show the use of Bitwise Operator (~) Complement

  16. Program to show an example of overloading constructors in a class to initialize its data members

  17. Program to show an example of Overriding a Base Class Method

  18. Program to show an example of searching Strings for characters

  19. An applet program to display barchart of given data

  20. Program that accepts a shopping list of five items from the command line and stores them in vector

 
 
Didn't find what you were looking for? Find more on An applet program of passing parameters