How can class Loading be on its own and not within the curly braces of Main class. It has to use extend(of inheritance).But | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can class Loading be on its own and not within the curly braces of Main class. It has to use extend(of inheritance).But

public class Main { public static void main(String[] args) { Loading loading =new Loading(); loading.LoadingMessage(); } } class Loading { public static void LoadingMessage () {System .out .println ("Loading");} }

26th May 2022, 2:49 PM
We Doru
We Doru - avatar
2 Answers
0
Can you finish your question? It got cut off.
26th May 2022, 3:12 PM
Justice
Justice - avatar
0
But it is still Error.
26th May 2022, 3:27 PM
We Doru
We Doru - avatar