Search:

Type: Posts; User: Hamenopi

Search: Search took 0.09 seconds.

  1. Replies
    4
    Views
    1,010

    Re: switch case , check range

    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:
    ...
  2. Re: To transform my code to be able to save the room booking into .txt file

    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...
  3. Replies
    3
    Views
    835

    Re: For Loop for Fibonacci code

    0,1,1,2,3,5,8....

    I think it works if you change b to 0.
  4. Thread: Loop Error

    by Hamenopi
    Replies
    17
    Views
    1,887

    Re: Loop Error

    Have you been here? I found it by googling "reverse array java"
    Collections (Java Platform SE 7 )
  5. Replies
    10
    Views
    1,678

    Re: VBA programmer trying to learn Java

    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.
  6. Replies
    9
    Views
    2,118

    [SOLVED] Re: Confused on how to use multiple Methods...

    Much better!
    Cheers!
  7. Re: Need knowledge on initialising arrays of various types

    public class MathEntity extends Entity {
    private MathEntity results[] = new MathEntity[3];
    private int result;

    public MathEntity() {
    id = EntityIDList.MATHENTITY;
    }

    public...
  8. Re: Need knowledge on initialising arrays of various types

    Yes, you can make an array of objects.
    Remember code goes in between code tags =)
  9. Replies
    7
    Views
    2,632

    Re: Homework help!

    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.
  10. Replies
    7
    Views
    2,632

    Re: Homework help!

    Can I get an autograph?
    Also could you put your code in between code tags =)
  11. Replies
    9
    Views
    2,118

    [SOLVED] Re: Confused on how to use multiple Methods...

    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...
  12. [SOLVED] Re: Need help using the MATH class for an assignment

    Cross-Post... Need help using the MATH class for an assignment
  13. Replies
    9
    Views
    2,118

    [SOLVED] Re: Confused on how to use multiple Methods...

    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?
  14. Replies
    9
    Views
    2,118

    [SOLVED] Re: Confused on how to use multiple Methods...

    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...
  15. Thread: Oh Hai!

    by Hamenopi
    Replies
    1
    Views
    799

    Oh Hai!

    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...
  16. Thread: Confused

    by Hamenopi
    Replies
    13
    Views
    917

    Re: Confused

    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. =)
  17. Re: How do you create a mathematical sequence?

    What have you written thus far?
    Toss it between some code tags.
  18. Thread: Confused

    by Hamenopi
    Replies
    13
    Views
    917

    Re: Confused

    Have you tried:



    public class Wamidh {
    public static void main(String[] args) {
    duck(); //<---
    }

    public void duck(){
  19. Re: Beginnner Java, Assignment Help (Ending a code)

    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
  20. Re: Just got started with Java - looking for feedback!

    It is a wildcard much like someone you is looking for photos may search for *.jpg

    You import everything in java.io
  21. Re: Beginnner Java, Assignment Help (Ending a code)

    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...
Results 1 to 21 of 21