Java Applet Programs With Set Path Code
Java Applet Programs With Set Path Code
import java.awt.*;
import java.applet.*;
/*
</applet>
*/
<html>
</applet>
</html>
www.awillguru.com
Run method in command line
ed
1 warning
C:\Users\awill\Desktop\practical>appletviewer appletEx.html
import java.applet.*;
import java.awt.*;
int a=10;
www.awillguru.com
int b=20;
int c= a+b;
g.drawString(str,100,100);
<html>
<body>
</applet>
</body>
</html>
import java.util.*;
System.out.println("Enter a value");
www.awillguru.com
int value= sc.nextInt();
System.out.println("value in main:"+value);
int aw=t.awill(value);
int awill(int v)
System.out.println("value in awill:"+v);
return 20;
class FactRec
int i,fact=1;
fact = factorial(number);
www.awillguru.com
static int factorial(int n)
if (n == 0)
return 1;
else
return(n * factorial(n-1));
} }
import java.util.*;
{ boolean b;
String f;
do{
int n=sc.nextInt();
int fact=fact(n);
www.awillguru.com
System.out.println("more factorial press y . For exit press n");
f=ch.nextLine();
System.out.println("you entered::"+f);
} while(f.equalsIgnoreCase("yes")|| f.equalsIgnoreCase("y"));
if(n==0 || n==1)
return 1;
www.awillguru.com