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
9 odpowiedzi
+ 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
+ 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");
}
}
0
MasterMind: the method you've added is named "LoadingMethod" but should be named "LoadingMessage" ;)
0
public class Main {
public static void main(String[] args) {
Loading.LoadingMessage();
}
}
class Loading {
public static void LoadingMessage(){
System.out.println("Loading");
}
}
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");
}
}
- 2
MasterMind
Can you show your code?
- 2
MasterMind
Are you sure you made right method? Check your code and tell me.
- 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");
}
}