Win a copy of Java Challengers this week in the Java in General forum!

Tomy Alexsander

Ranch Hand
+ Follow
since Dec 01, 2020
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tomy Alexsander

in line 40 it should add the player to the array. But how I can understand it does not work.

This is initialising the board and the rest of the methods



It is a which getting the board from the class

2 weeks ago
I do have a lit or big problem. When I am running my program it asks for the first player name and for the second. however, after I enter the second user name the boards do not want to display.

I am new to the GUI. Any suggestion?


Board class


Constans class


disc class



Game class


Player Class



Othello class



2 weeks ago
What about the last one? // Should use try-with-resources.

1 month ago
for example where you told me to remove and replace but some of them I do not understand

1 month ago
I am trying to solve this problem but unfortunately, i can not I tried to create a method but I am just doing something wrong.
1 month ago
I was trying to do something like this but it does not work too.

1 month ago
They will be all the time the same 30x30 or 40x40. We are not getting 30x20
1 month ago
The size of the grid must be input by the user not in the file. File hold only the grid.
1 month ago

Tomy Alexsander wrote:Unfortunately it does not work i am getting this error Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
       at hello.main(hello.java:10).

If I am running the second code which I send. Unfortunately, I need to do it in this way:



I am running grid 3x3 but i also have 4x4. 12x12 and 30x20
1 month ago
Unfortunately it does not work i am getting this error Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
       at hello.main(hello.java:10).

If I am running the second code which I send. Unfortunately, I need to do it in this way:
1 month ago
No everything is fine it is working but it is working only when I am entering the data however I want that the grid was read from the file. So the user no needs to enter the grid.
At the movementmoment, i am running it like this
4 -- the size of the grid.
0 0 0 1
1 2 3 0
2 2 0 2
3 3 1 0
9 -- the answareanswer

But i want to have something like java test 4 > grid.txt.

I have my grid in s separate txt file but i do know-how run the file

I tried to do this in this way but it does not work.
1 month ago
So at this stage, I am creating the grid, so first, I have to input the size of the grid like 4 and then input the grid
0 0 0 1
1 2 3 0
2 2 0 2
3 3 1 0

However, I want to read the grid from the file. For example, java test 4 < file.txt

Where 4 is the size of the grid and the file is my grid. Each time the user will enter the size of the grid and the file name of the grid.

Any suggestion on how to do it?

1 month ago
So I have a list of the sentence and some of the words are split by a slash and when I am removing punctuality it removes all the slash but does not create space between those words.

What do I need to do?

 lyrics = "Sing, sing a song/Let the world sing along/" +
       "Sing of love there could be/Sing for you and for me/" +
       "Sing, sing a song/Make it simple to last/" +
       "Your whole life long/Don't worry that it's not/" +
       "Good enough for anyone/Else to hear/" +
       "Just sing, sing a song";




Output;
lastyour
whole
life
longdont
worry
that
its
notgood
enough
for
anyoneelse
3 months ago
It is a task which I have to do.
Unfortunately, we such stupid requirement.
3 months ago

Tomy Alexsander wrote:Yes i am

but not all. we have massive limitation
3 months ago