I'm not quite sure how you can "jack up" the plus signs, but just "remember that " + " concatenates two strings, in general."
So, did it work for you? P: (Don't forget to mark the thread as solved...
Type: Posts; User: dpek
I'm not quite sure how you can "jack up" the plus signs, but just "remember that " + " concatenates two strings, in general."
So, did it work for you? P: (Don't forget to mark the thread as solved...
imho, it feels like you're just asking us to finish the code for you, rather then getting us to help you understand a problem you have.
If you aren't, it would be great if you could explain what...
None of your "\t"s are in quotes. "\t" only works when it's part of a string. Your println statement should look like this:
System.out.println( n+"\t" + n*n+"\t" + n*n*n );
First of all, what are you having trouble with? You seem to be using println statements correctly. Can you please be more specific about what you are trying to print out?
Sorry if I'm wrong, but that looks like Python, not Java. You'll need to go elsewhere for help on that.
No problem, glad you got it solved. I would suggest looking more into class-specific things in java like public, private, protected, static, void, get/set methods, what the args in public static void...
Don't forget to mark this topic as solved by changing the topic title to "[SOLVED] loading things from a text file into an array list" ^____^
First you said you needed to display the cars:
Then you said you didn't need to:
[/quote]
My question is: Are you required to create a program that displays cars entering and exiting?...
There is, but you don't need to, since the last comma is ignored when you load the file.
I'm guessing you've never seen foreach loops before and you don't know what .split() does.
.split...
There are also a couple ways to do this, like setting a getInventory() method in your player class, which returns the inventory. And actually, you don't even need to do this at all. Since you...
I'm sorry, but I'm not quite sure what you're trying to say here.
If you want to convert "a,b,c" to an array [a,b,c], so that the list of elements are put in the array correctly, the try block of...
However, in your save.java class, you are doing this:
try {
PrintWriter save = new PrintWriter(new FileWriter("save.txt"));
save.print(player.inventory + " ");
save.close();
}
Which...
Try using savedInv.next() instead of savedInv.nextLine()
Hi, I've taken a couple of Computer Science classes and I'm coming over here to see if I can help other fellow Java programmers with their programming problems!
You can check out my blog, if you...