Ariana Green

Greenhorn
+ Follow
since Jan 16, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ariana Green

Hi,

I'm a bit of an IT beginner but even I'm frustrated by the limitations of Vista on my laptop. I'm comfortable enough using OSX on my Mac and am comfortable with command line stuff, etc. It's got me thinking about putting a linux system on the laptop, but I'm not entirely sure where to start, what to choose, etc. I guess what is really prompting this is that I need to use scientific software for Uni and it just won't work with Vista. I could backtrack to using an XP OEM but I'm wondering if I should just bite the bullet and convert to linux. Trouble is I've always thought that linux really is for IT experts... I don't *really* know what I'm doing, but with clear instructions I can usually learn.

I probably sound like a right idiot, but advice would be appreciated...

Thanks,

A.
15 years ago
Thanks, I finally got it to work.

Right, that's given me plenty of material to try and digest. Especially with regards to the semicolons, it makes a lot of sense now I can understand why they're there (and when they shouldn't be). And, yes, I understand the actual process a lot more (pretend wisdom speech). And there is definitely sense in only changing a few things at a time...

I'm off to experiment. I think I've got enough information to not have to ask any more questions about constructors, loops or methods. Which should keep me going for a little while :roll:

Apologies for taking so long and just being generally slow.... ops: ops: ops:
15 years ago

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.



yes, I'm starting to notice that what I mean is that I fix one error and get a whole load of different ones in its place. I'm starting to understand why that is though. Thanks!
15 years ago
OK I don't know which is more annoying, the fact that it won't work or the fact that I can't figure out why...

This is slightly modified from your original code so I might have done something blatantly wrong here:



And the compiler error:



I was hoping that I HAD specified a return type ops: ops: ops:

Oh dear. Maybe I should just bury the computer and go live in a cave somewhere.
15 years ago
Well, I put the static back in before I posted, then took it out again because the same error came up regardless? I'm back up to five error messages now... the more I try to fix it the worse it seems to get.

I didn't know the thing about the braces though. Now, should I be declaring my main method first, before anything else? And, do you mean exactly one more open brace than a closed one? Because I have several pairs, but they will be closed.

Here's a weird thing: when I move the } to below the main method, I get three different compiler errors all saying "missing method body or declare abstract."

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...
15 years ago
Well, I didn't think the void should have been there, but for the wrong reason

I think I just about understand the difference between methods and constructors.

So, I'm now down to one compiler error, down from 100. Deleting every single space and putting a 'fresh' one in has got rid of all of the Unicode errors, don't known what happened there (though I think I pasted it directly from the browser before tinkering with it which might explain it).

I wrote a for statement from the java tutorials to put into the loop and so far it hasn't been rejected so I'll leave that in - if this thing ever compiles it will be good to see it working!!! I have this thing about watching which bit of code does what, I tend to not know what's going on otherwise. SO I was determined to work this out for myself, but since there's only one remaining error message I think I will plead for mercy:



Because, quite frankly, I can't see ANYTHING wrong with that. EDIT: incidentally, it makes no difference to the compiler if I make it static or not, or if I shove an ; on the end before the brace... which is something I didn't know... perhaps someone could clarify that for me?

Oh, and this is a really dumb question, but what's the definition of a return type? Because I know, sort-of, what it kind-of is, but not enough to be completely sure...
15 years ago
Ahh. Well, I was close (not really, but telling myself that makes me feel better...)

I'm on OSX, and I use TextWrangler. It's designed for developing so I can't see why there'd be a problem with it. Deleting all the extra spaces behind the braces has so far removed half of the errors, but I've still got 50 remaining ;)

I'm not going to be able to give up on this one until I get it to compile.

Great learning curve...
15 years ago
Sigh. Lateral thinkers do not make good programmers.

I first thought that the error might be a missing ; then I was wondering if the method (method? constructor, whatever it is) should have been something other than void as it's needed to, well, do something. I then thought that, well, it's an integer so the name "number" wouldn't work. Seems like I was wrong on every point! Either that or there's something else wrong anyway. The constructor name matches the class name so it's not that. Can a public, uh, thing call a private, uh, thing - good grief, I don't even know WHAT I'm talking about now -

So... in short, I couldn't fix it after ten minutes and gave up. Tell me, pleeease? Because I won't be able to sleep otherwise...

My understanding of Java is, as is now apparent, sketchy at best. At worst... well.

Yes, I figured out the bit about the compiler errors, they confuse the heck out of me. I managed to fix one problem in my code and twenty-nine errors disappeared at once, so I'm starting to understand that. And I even figured out how to work out which line the errors are on... yes, that took me several hours. As for the error messages themselves, I seem to have two common ones:

llegal character: \172 -and- illegal character: \8224

I don't know WHAT that means. I thought they were Unicode characters but that just comes up with random characters I don't even have in my code, so... huh?

It's a learning curve and I'm NOT going to quit, no matter how much I embarrass myself. I want to weep with joy every time I get a piece of code to actually run, my failure rate is that high.

Well, better get back to, I don't know, whatever it is I'm supposed to be doing right now.

Thanks all for the help..
15 years ago
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 snippetse, and the programs I find online to try are dubious to say the least but I I'm not smart enough to work out why (100 errors for a 5 line bit of code!? and this from a consultancy site... whatt??). 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...)
15 years ago
How long do you think it would take for a complete Java beginner to be able to sit their SCJP? For someone who is a fast learner but has average, but not brilliant, IT skills in general? I know that's a very loose question, but it would be good to know: a year? a few weeks? Just wondering what the average time taken would be (I have a test date looming but I'm not feeling confident).
Hi, I've been looking at some of the mock tests for SCJP SE 6 and I was just wondering if there were examples of code anywhere for the objectives in the exam. I understand the principles but it would be good to see (and try) code examples so I know what does and doesn't compile. It would be good to see code that is aimed specifically at SCJP level... any ideas?
It's okay, I worked it out. Obviously it's println not printIn, duh. I did know that, honestly. Just a typo........... *blush*

So, it's compiling and running fine now. I was actually delighted when it worked! Sad, I know. I will be back with even more awful and embarrassing questions in the next few minutes / years / days, I absolutely guarantee it.

Thanks for the welcome and help. That link will come in handy
15 years ago
I must be the world's biggest idiot but I can't get even the most basic code (hello world) to compile. I'm on OSX and when I try to compile, terminal just comes out with "1 error" and I don't even know how to check what that error is. It's really embarrassing asking for help but my code looks fine, and I'm saving it in the right directory (at least I'm pretty sure I am - Library/Java). agh I don't have a clue what's going wrong.

Sorry sorry sorry. If I don't learn by doing I don't stand a chance. please don't gnaw on my flesh too much for this...

A.x
15 years ago