wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Brackets problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Brackets problem" Watch "Brackets problem" New topic
Author

Brackets problem

Kacey Simeon
Greenhorn

Joined: Jul 30, 2011
Posts: 18
Im having a serious problems with my brackets (At least i think thats how you spell them.) They were perfectaly fine untill i tried to initiate lives. After that the code has all but fallen apart. I have always had a problem with brackets so if anyone could help that would be awesome. Here is the code.


Im sorry if its a bother but i need some help.
Kacey Simeon
Greenhorn

Joined: Jul 30, 2011
Posts: 18
Im sure someone would like to know how i fixed it. on line 380 i had to tab over that bracket, then i had to put a bracket inbetween line 379 and line 380. then i had to delete the last braket in the code. I feel stupid but whatever.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Surely the answer to no 20 is "he writes down, 'Can I have some sunglasses, please.'"?
I had to divide that question because lines that long make the code difficult to read. Also deleted some blank lines. So your 360 might now be 361.
But it is a disaster to have a method that long. You should have a Quiz object, and read the questions and potential answers from a text file or files.
Never say == true or similar. Not if (crowd == true) ... but if (crowd) ... If you want it false, use if (!boo) rather than if (boo == false). The reason is that == true or similar is poor style and you can get lots of errors if you mistakenly write = instead of ==.
For reasons given here, never use the tab character when writing code. (You can use \t in Strings however).
Your printouts for randomFor5050 should be put into an array, then you can say System.out.println(answersFor5050(randomFor5050));
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Brackets problem
 
Similar Threads
New java questions
Help with english to morse code program, I have no idea what I'm doing
Arrays.sort() NullPointerException
MD5
Suspected Error in Answer for a Thread Question in "Practice Exams Java"