0
Singlton Pattern In Scrabble give to sets of 7 random letters in one instance
Hello, I copied this code form you tube, the link is in the comment, Idk if I have a syntax error, Or sololearn dosent support those libraries https://code.sololearn.com/cKAXE5c2iVbD/?ref=app
7 odpowiedzi
+ 2
Leonardo Monterey
Ok. Just added some code as an example to get output.
You can add more code from vedio to main method..
Edit:
For more about pattern links see this..
https://www.sololearn.com/Discuss/2188780/?ref=app
https://code.sololearn.com/cb913x5q5f2Q/?ref=app
+ 1
Hello Leonardo Monterey
The import statements have to be above your class, not inside.
import java.util.Arrays;
public class Program{
And It looks like that you are missing some brackets. Maybe some are too much.
Please check that every opening bracket { has also a closing bracket }
+ 1
See the video again..
import stetements shloud be at start of code.. Make proper changes..
Ex:
Remove 1st 3 lines of text and last 2 braces...
Put this at last and run..
public class Program
{
public static void main(String[] args) {
Singleton newins=Singleton.getInstance();
System.out.println(newins.getLetterList());
}
}
Leonardo Monterey
Add this class. You get some output....
Remaining code you can add from 3rd page from link
+ 1
Leonardo Monterey
I really suggest you to learn the basics of java.
I outcomment your main method. But without main you can't run your program.
0
I know nothing about Java,still I removed all the errors by following the basic syntax and reading them, and you just pasted it here thinking that we should remove those errors for you for something that you copied ?do you think we are robots ?
0
I pasted it and It was all scrambled so, I spread it acording to the screen shots, alright, I will check my syntax again
0
Alright, I think I cleared up the syntax, the program is running fine, except it returns no output