Ariana Green wrote:OK, more dumb questions...
I'm trying to write code from scratch because quite frankly I can't get anything I pick up online to compile. I need to learn by doing so this seems the best way. I understand the rationale behind methods, constructors etc but I'm struggling to pool it all together: most of the examples I read are just code snippets that obviously won't execute, and the things I find online to try are dubious but I can't work out why (100 errors for a 5 line bit of code!? and this from a consultancy site... it must be ME making the mistake, right??). So anyway...
I start with declaring the public class, then the public static void main stuff (is that required?), then I get a bit stuck. If I want to write a class that iterates through a loop until the conditions are met, how do I declare it? Do I set the variables before I type the method? Do I need a constructor, and if so, what exactly do I need to construct? And so forth.
In my head it's all got very muddled and complicated...
I *thought* I understood it fine until I actually started to write the stuff! (Yes, I know. Don't shout at me, at least I'm trying...)
but if it was 172 decimal then it would come out as ¬ which is the logical "not" symbol which isn't used in Java and if it was 172 octal then it's "z" which is permissible in Java. \8224 appears to be Chinese.Ų
0172 LATIN CAPITAL LETTER "U" WITH OGONEK
≡ 0055 "U" 0328 $̨
Identifier i out of expected context in line 3.
Operator := out of expected context in line 3.
Identifier j out of expected context in line 3.
Operator + out of expected context in line 3.
Number 3 out of expected context in line 3.
I'm absolutely flipping determined to work this one out but if I don't manage it within the hour, I'll post the whole lot as it stands right now. I don't know how I make a simple thing so complicated, honestly...
Henry Wong wrote:the number of errors don't mean much. A single error can chain react to other errors. This is why you should only fix one or two errors (the first ones) and then recompile.
Java hobbyist.
Don't get me started about those stupid light bulbs. |