Java Programming Solutions
Java Programming Solutions
1. WAP to enter two numbers using command line argument and calculate their Sum and
multiplication.
if (i % j == 0) {
isPrime = false;
break;
int a = 0, b = 1;
int next = a + b;
a = b;
b = next;
import java.util.Scanner;
6. WAP to Print: * * * * * * * * * *
System.out.print("* ");
import java.util.Scanner;
} else {
class InnerClass {
void display() {
void show(int a) {
void show(String a) {
obj.show(5);
obj.show("Hello");