class Test06{
void Star(int st){
// the number of [types + parameters] must match!!! -> `int` declaration
// `st` = parameter = user-defined name
// when execution reaches the code `int st`, memory is allocated
// and when the Star function scope ends, that memory disappears
// local variable `st = 50` (not assignment in concept, but initialization!!!)
int i;
for(i=0;i<=st;i++){
System.out.print("*");
//if(i==10) return;
}
System.out.print("\n");
// return;
}
}
public class fun06 {
public static void main(String[] args) {
Test06 t = new Test06();
t.Star(50); // type + parameter count must match!!! (see above)
System.out.println("Hello Java");
t.Star(40);
int a=1;
t.Star(a);
}
}
