Let's say i have a code like this :
public class Test {
public static void main(String args[])
{
int x = 5;
// Widening Casting
double myNum = x;
System.out.println(x + " " + myNum);
}
}
Now i write the following commands in powershell changing the value of x from 5 to 6 once in my code and saving it, it works perfectly fine. But tutorials online suggest me to use javac for compilation. Why so?
