00001 package jpl.util; 00002 00003 00004 public class Prog 00005 { 00006 public static int i_am_static_1 = 1; 00007 00008 public int i_am_not_static_2 = 2; 00009 00010 public static java.lang.String S = "hello"; 00011 00012 public static class Inside 00013 { 00014 public int intErnal; 00015 } 00016 00017 public static void main(String[] args) 00018 { 00019 System.out.println("Hello World"); 00020 } 00021 00022 public static float div0() 00023 { 00024 return (float)(1.234); 00025 } 00026 00027 public static String welcome() 00028 { 00029 return "Welcome to JSP!"; 00030 } 00031 00032 public float div1(int d) 00033 { 00034 return i_am_static_1/d; 00035 } 00036 00037 public double div2( int d) 00038 { 00039 return i_am_not_static_2/d; 00040 } 00041 00042 public static int add_ints( int i1, int i2, int i3) 00043 { 00044 return i1+i2+i3; 00045 } 00046 00047 public static float floats_to_float( float f1, float f2, float f3) 00048 { 00049 return f1+f2+f3; 00050 } 00051 00052 public static double floats_to_double( float f1, float f2, float f3) 00053 { 00054 return f1+f2+f3; 00055 } 00056 00057 public static String double_to_string( double d) 00058 { 00059 return "The answer is " + d; 00060 } 00061 00062 } 00063