If you really want to torture yourself and anyone else looking at your code, you could do this:
int grade = 68;
switch (grade/10) {
//stuff
case 6:
...
Type: Posts; User: Hamenopi
If you really want to torture yourself and anyone else looking at your code, you could do this:
int grade = 68;
switch (grade/10) {
//stuff
case 6:
...
Things to remember while creating a new thread:
1. Make sure you are posting under the right sub-forum
2. Add a descriptive title that summarizes your message. Avoid vague titles like "Please solve...
0,1,1,2,3,5,8....
I think it works if you change b to 0.
Have you been here? I found it by googling "reverse array java"
Collections (Java Platform SE 7 )
I'm a VB programmer by trade self learning Java. I was very WTF? about it for a while. Now my VB code looks like a bunch of functions and subs all calling each other.
Much better!
Cheers!
public class MathEntity extends Entity {
private MathEntity results[] = new MathEntity[3];
private int result;
public MathEntity() {
id = EntityIDList.MATHENTITY;
}
public...
Yes, you can make an array of objects.
Remember code goes in between code tags =)
Like do you mean for every minute it's 1 dollar ?
and for every hour it's 60 - 20 dollars?
Yes there are 'better' ways to do it but it's good to start simple.
modulos can wait.
Can I get an autograph?
Also could you put your code in between code tags =)
You aren't getting 50 errors for that?
You are seriously cover complicating (and probably over thinking) the situation.
Store user input as choice
Validate choice
Choose option based off of...
Cross-Post... Need help using the MATH class for an assignment
let me psuedocode the logic for you and see if you can connect it together
begin
print(options)
print("Select an option")
value = selection chosen
is value a number?
Sounds like you are looking for an if statement.
or for extra credit, a switch.
You have enumerated the options, and stored the received integer value.
if value is 1 then do addition
if value...
I'm Hamenopi and I punch keys.
Earlier this year, I decided to learn Java so I started following tutorials and pretty much copying code. I soon realized that you end up with something that...
In all fairness, all i did was copy your 2nd post and replace // TODO Auto-generated method stub with duck();
I didn't even look at anything else. Good on you figuring out static. =)
What have you written thus far?
Toss it between some code tags.
Have you tried:
public class Wamidh {
public static void main(String[] args) {
duck(); //<---
}
public void duck(){
Methinks your logic is may be off.
if(number < 9999); //Then what?
if(number > 100000); // Then what?
System.out.print("Thank you.");
low bounds : 10000
It is a wildcard much like someone you is looking for photos may search for *.jpg
You import everything in java.io
I see where you are converting your integer to a string but not doing anything with it.
One route you could go with strings:
PsuedoCode
//syso() = system.out.println()
if myString.length...