Cool, so my if statement is pretty much alright? I hate to sound amateur then, but do you know why it's dying at around that point? I'm completely lost if it's not a problem with the if statement.
...
Type: Posts; User: Omnamah
Cool, so my if statement is pretty much alright? I hate to sound amateur then, but do you know why it's dying at around that point? I'm completely lost if it's not a problem with the if statement.
...
I was inspired by the philosophies of the free exchange of information, the distribution of free software and source code, etc. to learn to code. I think it stems from my hippy political tendencies...
So I was reading through David J. Eck's fantastic and free Introduction to Programming Using Java, and he mentioned the .charAt() function within the String class. I got thinking how I could use this...
I'm gonna say DJing. I've done some nights around my hometown supporting local bands and whatnot. I've been planning to DJ out a lot more now I'm at uni, but it turns out the small town of...
I'd just like to point out, when I said I'd copied and pasted the code I meant I'd typed
else if (op.equalsIgnoreCase(operators[2]))
I copied and pasted it the relevant amount of times, somehow...
Ack, that's what I get for being lazy and c+p-ing sections of code. Fixed now.
Is .equals() really all that different from .equalsIgnoreCase()? I used IgnoreCase because it makes more sense from a...
Explanation below code.
import java.util.Scanner;
class apples {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
double sum;
String[] operators...
Thank you nonetheless Shia. You made me aware of some new tools to use. Like I wasn't aware of .add and it didn't even cross my mind to use ||. Even if they're not perfect for this scenario, they're...
This is gonna take a little bit of brain processing to settle in. Thanks for the pointers, I haven't really gotten much into the theory behind the language much, more merely 'that does that which in...
Yeah, I think my terminology is a little off...
Ah, I made that exact same mistake the other day and posted a thread on here too, haha.
Just tried it, works fine. I keep forgetting that Strings sometimes differ from the built in variables.
...
So I'm off to uni soon, but the uni are really behind on sorting out accommodation, so I thought I'd write a little piece of code, as practise, to work out how much money from George Gideon Osbourne...
Yup, I knew I'd kick myself. It's always the stuff in plain sight that you miss...or is that just me?
Poobah ± Boohbah? boobah - Google Search
In your name we shall start many a war and kill many people for questioning your authority, for it is the holy way...wait.
Also, what does the 'PF' stand for? I feel like I'll kick myself once...
I used to drink tonnes of fizzy, particularly coke, but then my chest around my heard started to hurt like a boss.
A gallon? No wonder you got addicted, 0_0. Did you float away in a strong breeze?...
I hope it's not...
You use a pot? I can't remember the last time I used a pot to make tea. 1 bag = 1 cup. But that's easy for me to say, what with living at home with my parents still.
I tried...
That's the plan, :D. I've looked at a couple of forums along these lines (dream.in.code, Java-Forums.org) but this one feels like the friendliest.
I've seen you around a lot on here (I think...
Favourited, (Y).
I'm surprised you ever sleep with that much caffeine!
I prefer the original flavour Relentless. I usually don't break the bank that much and just get cheap-ass Kick/KX from Tesco. I remember...
2 TABLEspoons of instant coffee?? :o. Wow. Your heart must be on tenderhooks, :p. And you must be hyper all day. I find if I drink too much coffee I start to feel crappy and almost kinda dirty, o_0....
Solved with .equals()
Check out Java: ==, .equals(), compareTo(), and compare() for more info on .equals() .
Worked like a charm.
Coffee is pretty big within Java circles it seems *looks at banner at top of page*, so I was wondering: How do other programmers (I use the term lightly when applied to myself) have their coffee?
...
Just found this for anyone else having a similar problem: Java: ==, .equals(), compareTo(), and compare()
I can't seem to find your message anywhere.