0

Creating Classes & Objects

4.2 Practice /Java Create a program to show loading message to your application users. Define a class Loading which has one public method called LoadingMessage(), which should print "Loading" when called. Create an object named loading and call that method. https://sololearn.com/coach/732/?ref=app This is my try but the error is “Cannot find symbol” and I don’t know what to do

10th Jun 2021, 9:25 AM
Bushra Al Jahwari
Bushra Al Jahwari - avatar
9 Answers
+ 3
class Loading{ public static void LoadingMessage(){ System.out.println("Loading"); } } public class Main { public static void main(String[] args) { Loading loading = new Loading(); loading.LoadingMessage(); } } // My tiktok and another accounts https://linktr.ee/developerx
8th Nov 2021, 12:58 PM
Mohammad Jamal Mahmoud Al Jadallah
Mohammad Jamal Mahmoud Al Jadallah - avatar
+ 1
public class Main { public static void main(String[] args) { //Please Subscribe to My Youtube Channel //Channel Name: Fazal Tuts4U Loading.LoadingMessage(); } } class Loading { public static void LoadingMessage(){ System.out.println("Loading"); } }
4th Sep 2021, 5:34 AM
Fazal Haroon
Fazal Haroon - avatar
0
MasterMind: the method you've added is named "LoadingMethod" but should be named "LoadingMessage" ;)
10th Jun 2021, 1:06 PM
visph
visph - avatar
10th Jun 2021, 1:15 PM
Bushra Al Jahwari
Bushra Al Jahwari - avatar
0
public class Main { public static void main(String[] args) { Loading.LoadingMessage(); } } class Loading { public static void LoadingMessage(){ System.out.println("Loading"); } }
15th Nov 2022, 7:47 AM
Pooja Patel
Pooja Patel - avatar
0
public class Main { public static void main(String[] args) { //create a Loading object with the same name Loading l = new Loading(); l.LoadingMessage(); } } class Loading { //complete the class, add LoadingMessage() method public void LoadingMessage(){ System.out.println("Loading"); } }
28th Jan 2024, 5:24 AM
S8ul Yuvraj
S8ul Yuvraj - avatar
- 2
MasterMind Can you show your code?
10th Jun 2021, 10:04 AM
A͢J
A͢J - avatar
- 2
MasterMind Are you sure you made right method? Check your code and tell me.
10th Jun 2021, 12:20 PM
A͢J
A͢J - avatar
- 3
public class Main { public static void main(String[] args) { //create a Loading object with the same name Loading loading = new Loading(); loading.LoadingMessage(); } } class Loading { //complete the class, add LoadingMessage() method public static void LoadingMessage(){ System.out.println("Loading"); } }
13th Jul 2021, 3:33 PM
Kumar Darpak
Kumar Darpak - avatar