Jump to content
Sign in to follow this  

problem with Array (Java Beginner)

Recommended Posts

Racing games have been more and more popular today partly thanks to the awesome benefits they have brought to players.  For example, they help reduce stress, improve your concentration and focus, boost your memory, enhance decision making, strategy, and problem-solving skills. 
If you’re looking for some quality games of this genre to enjoy their benefits, we have some suggestions for you:
1.    Hilly.io
In the fantastic multiplayer racing game, you’re required to try and beat other players worldwide in hectic racing action. Race as fast as you can. Meanwhile, account for the hills’ movement and height. Your speed and momentum can be affected by the hills. 
You’re required to try and time your jumps in a way that couldn’t be better to hit the hills at the proper time. Also, strive and reach the checkpoints in the fastest time. 
The game has fun side-scrolling gameplay is fun. The upgrades are buyable, and the ball’s model is changeable. Ready to conquer the game and put your driving skills to the test?
To play, press your left mouse button or the Spacebar.
2.    Russian Car Driver ZIL 130
In the truck driving simulation game, you control the soviet truck produced in 1964-1994. It gives you a real feel into how to master the controls of this legendary truck.
You have a great chance to move freely throughout the map and explore the stunning landscape awaiting you. Or become the ultimate long-distance trucker by trying and competing in different challenges. Six awesome game modes are readily available to play. They are also particularly fun to join. The 3D graphics are stunning with attention to details. The garage’s design can be customized. Driving’s skill is upgradeable. Enjoy!
For the game controls, to drive, use the arrow keys or WASD. Change the camera view with C. Rely on the Spacebar to use your handbrake. Horn with H. To open the menu, rely on Esc.
3.    Kart Wars
If you’re fond of Mario Kart, you will like Kart Wars. The battle mode asks you to work together with others to capture the enemy flag. Meanwhile, defend your own flag. 
You can select from different characters. Different characters have different vehicles and abilities. The game is fun and challenging at the same time. As you progress, it’s possible for you to unlock new vehicles and characters. Remember to customize your character’s appearance too.
Different maps are available to play. The 3D graphics are realistic. The game has a cool explosion effect. 
To drive, use the arrow keys or WASD. To shoot, just left click. To use nitro, rely on Shift. If you’re going to jump, use the Spacebar.
Edited by Usety1955

Share this post

Link to post
Share on other sites
On 11/24/2018 at 7:40 AM, Usety1955 said:

Hi guys, 

I have a problem with my code and I really hope you can help me! In this part of my code I would like to let the user make two user inputs. "eingabeZeile" and "eingabeSpalte". This user input should then be but to the place of my array "Spielfeld" like this: spielfeld[eingabeZeile][eingabeSpalte], but in the way I try to use it eclipse just gives me an error code: The left-hand side of an assignment must be a variable.

I use IO.readInt() in there to let the user type in an input. Our prof gave us that class. 
I hope someone can tell me what I'm doing wrong or how I can solve this different. As you might have guessed: I'm not an english native, so feel free to correct, but not to judge and please ask if something is unclear. 

Edit: I realized I interpreted the situation wrong..

Did you declare the array correctly? You need to define a 2-dimensional array like so: private Type[][] = {};

Just replace the Type with the type you are using.

Edited by Atex

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this