Search:

Type: Posts; User: Time4Java

Page 1 of 3 1 2 3

Search: Search took 0.26 seconds.

  1. Replies
    5
    Views
    130

    [SOLVED] Re: Reading file in

    You were completely right Norm, I forgot to actually close the file...
    both arrays now contain the same data, and the comparison between the arrays returns true.
    Stupid of me, thank you very much...
  2. Replies
    5
    Views
    130

    [SOLVED] Re: Reading file in

    using your method:

    Original file [116, 101, 115, 116]
    Temp file []


    using this bit of code:


    for(int i = 0; i < java.lang.reflect.Array.getLength(tF); i++)
  3. Replies
    5
    Views
    130

    [SOLVED] Reading file in

    I'm trying to compare 2 files by using byte arrays.
    My problem is the first file(File class) gets converted to the byte array without issue, my second file also gets created, so I'm sure it exists...
  4. [SOLVED] Re: Executable jar file gives different result then just running the main method

    Checked it out, Thanks you very much.
  5. [SOLVED] Re: Executable jar file gives different result then just running the main method

    Final update:

    I've got everything working as it should now,

    The solution was putting this into my main method:


    Runnable r = new Runnable() {
    public void run() {
    ...
  6. [SOLVED] Re: Executable jar file gives different result then just running the main method

    never done it before, let me go take a look how to do that

    --- Update ---

    Running the program with the java command or the jar give the same results, the text area is not visible and as far as...
  7. [SOLVED] Executable jar file gives different result then just running the main method

    So up until now I've never made an actual executable jar file for my projects,
    so this is a first.
    I'm currently making a text editor / memo thing, and so far I've got a text field to put your text...
  8. Re: Effective Process for Learning Java in college

    Hey there,

    You should google java tutorial, or:

    Tutorials Point
  9. Replies
    2
    Views
    189

    Re: Troop needs some Java Help (while loop)

    You could use a boolean value to determine wether or not your while loop needs to end,

    like:
    boolean running = true;
    while(running)
    {

    }

    Then you need to check if your while loop has...
  10. Thread: HOW ??????

    by Time4Java
    Replies
    7
    Views
    327

    Re: HOW ??????

    What have you tried?
    Perhaps you should do a google search for how to split a string, I'm sure you'll find something,
    As for the big paragraph, maybe you should look into collections?
  11. Re: Recompiling errors even on unchanged .java files

    and what does it say, how does it stop you from compiling?
    What is the exact error message that the compiler is giving you?
  12. Re: New to Java - Question on complecity of a program.

    If you are new to java or programming I wouldn't go ahead and make a program that will be in charge of deciding wether or not to spend YOUR money online.

    The chances that you make an error are...
  13. Re: Recompiling errors even on unchanged .java files

    Cornix, I've come across plenty of silly little programs made for learning from that come in a jar file, like a tetris clone, or snake,
    Examples during tutorials, and such.

    So that's a use for...
  14. Replies
    6
    Views
    388

    Re: questions on error messages

    I think this might help you if you are having trouble with your syntax,
    Common java mistakes,
    If you are still having trouble with basic syntax, perhaps you should follow the tutorials listed on...
  15. Replies
    6
    Views
    388

    Re: OOP Java Programming

    How to ask questions the smart way.
  16. Replies
    3
    Views
    343

    Re: Trouble with 2D Arrays

    What output did you expect, and what output did you get? :)
    Also, what are you doing in this part of your loop?
    r <= puzzle[0].length-word.length();
  17. Re: Picture Puzzle Slide - Help please (beginner)

    Just reading through here I get the feeling you are rushing this.

    Studying the code without knowing what is done and how will not help you as soon as you need to change anything.
    So if you are...
  18. Replies
    2
    Views
    394

    Re: How to write a mini Sudoku?

    Any specific problem?
  19. Re: I missed string arg[]..but compiler did'nt throw an error and worked as i thought..is it mandatory to use string arg[] for all java apps?

    You can create a method called public static void main, and use it like you would use public static void main(String[] args),
    since they both are static, which is why you can use them without...
  20. Replies
    5
    Views
    439

    Re: HELP! cannot convert int to boolean

    I know the feeling, i went through half of my first programming module(120 lesson hours) without getting it, and it can seem like your teacher isn't teaching you at all ;p
    You just gotta get into it...
  21. Replies
    5
    Views
    439

    Re: HELP! cannot convert int to boolean

    - Hey there, I'm not quite sure why you are making 2 Scanner objects, you can just use the one for both Strings/ints/characters etc,
    having to type user_input for your Scanner might not be the...
  22. Replies
    5
    Views
    377

    Re: Painting a custom shape

    I'l take care of that thanks, yes, square wasn't initialized, Found my answer ;)

    --- Update ---

    Is there a better way of making a custom shape(like the 4custom squares on top of each other,...
  23. Replies
    5
    Views
    377

    Re: Painting a custom shape

    That's the thing, everything has been initialized properly, so the nullpointer exception doesn't make sense to me
    LineShape shape = new LineShape(this);
    This is what gives the...
  24. Replies
    5
    Views
    377

    Painting a custom shape

    Hi, I am currently trying to make a Tetris game, so far I've got a class drawing that extends a JPanel as my canvas, a class Square that is 1 square(20 by 20) and a class LineShape that should draw 4...
  25. Replies
    13
    Views
    422

    Re: Help new guy with code please

    Please post your code here in between code tags, the # symbol.
Results 1 to 25 of 63
Page 1 of 3 1 2 3