Hello guys :)
Here I am again, now with a problem in I/O.
The objective of this program is to input a word in the terminal/console and then the scanner would search the word in a specific txt...
Type: Posts; User: Flcha
Hello guys :)
Here I am again, now with a problem in I/O.
The objective of this program is to input a word in the terminal/console and then the scanner would search the word in a specific txt...
I used the breakpoint and when it arrives to the step of the "For loop" it jumps to the end of the program...
If I change size=4. the terminal window will display 16 results
Now I can tell what...
Hi Greg.
I can't tell you the result of the operation, because the terminal window doesn't show me anything.
About the variable size, I don't know. I just copied this small line of code from my...
Before starting to tell the problem with my method, I want to greet everyone in Java community :)
This time, I have a problem with an 2D array.
Arr is of integer type with dimensions of [4][4]....
Greg
I tried this and now works ;)
I took off the rotationinRadians=0.0; and did other small modifications
see
public void moveForward(int dist)
{
Ok.
I will repost again all the code of car2 class (the class that I'm working in)
import comp102x.IO;
import comp102x.Canvas;
import comp102x.ColorImage;
/**
No matter what I do, the car only moves in the x-axis. It's like it's not recognizing the y-axis coordinates.
I suppose will be this
...
carImage.setX(carImage.getX() + (int)distX);
...
Thanks for your fast reply.
The program doesn't use the paint component.
And yes, I know some basic trig, although it was very long time that I studied that.
And sorry because I forgot to post...
Sorry :\
Here it goes...
public void moveForward(int dist)
{
// Obtain the current rotation in degrees
int rotationInDegrees = carImage.getRotation();
//...
Hi guys,
I'm new in this forum and I'm using it to help me in my coding classes.
I just have one problem with a "car" program in java.
The objective is to move the car in the direction it is...