This seems to be how Java works.
The below link is to the DreamInCode.net forum thread where Martyr2 answers the question about calling methods from Main:
How To Call A Non Static Function From...
Type: Posts; User: ShadeDarkan
This seems to be how Java works.
The below link is to the DreamInCode.net forum thread where Martyr2 answers the question about calling methods from Main:
How To Call A Non Static Function From...
I copied your code into netbeans to look at it further. The following re-format let me compile with no errors:
import java.util.Scanner;
public class apple
{
public static void...