0
Why does it give such errors? Please help
5 odpowiedzi
+ 3
public class Program
{
public static void hi(String n)
{
System.out.print(n);
}
public static void main(String[] args) {
hi("Hey");
}
}
Like this it works
+ 2
You cannot declare a function inside a function.
+ 1
Because u re declaring ur method inside the method main instead u have to declare it inside the class and then you can call it from the main u got me ?
0
yes mam, Thank you Nassera
- 1
CarrieForle We cannot declare functions inside main method?