• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Remote Desktop Software using Java

    I run my Java version with a frame rate of about 4-5 frames/sec, which is more than good enough for anything except real video. It's the network that ultimately is …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help printing out my arrays separately

    That's because arrays in Java start with element 0 eg if you have 3 elements they are numbered [0]. [1] and [2] that's 0 to (number of elements)-1 You soon …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help printing out my arrays separately

    Something like (pseudo-code): for i = 0 to no of families -1 get family name & store it in names array[i] for j = 0 to no of titles for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help printing out my arrays separately

    That makes sense, but if the 2D array is going to hold the titles for each name, it needs to be an array of String[][], not int[][], that's all
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Simple Looping Help

    OK, it's done.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in If we implementing interface is that inheritance ?

    OK, thanks for clarifying that. J
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Simple Looping Help

    Hi LegendX - what help do you need?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in If we implementing interface is that inheritance ?

    Yes indeed. What exactly did you mean by "(you don't automatically do)"? If the interface defines a default method then you inherit it, whether you meant to or not.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Need help printing out my arrays separately

    It looks like the problem is with the arrays you are using, noy how you print them. You create a 2d memberNames array that looks like it should have one …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Arrays help

    Spend what time you do have learning about arrays and forget trying to finesse extra credits. If you don't understand arrays you certainly won't get any further anyway.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Remote Desktop Software using Java

    > I could create a GUI using Swing and add by using Robot class to imitate mouseactions and keyactions and by using screen capture and Compression and TCP/socket programming I …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in If we implementing interface is that inheritance ?

    stultuske was right until last month. The latest version of Java (Java 8) allows static methods and "default" instance methods to be defined in interfaces, which are inherited by any …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in A telephone directory tester in Java

    You need to create some `new` instances of TelephoneDirectory, then use them to call all the methods and print the results to see if they are correct. ps: TelephoneDirectory is …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in String a ="SMS Message " or String a = new String ("SMS Message")?

    > rather, the value assigned to the variable. ??? the variables are reference variables, and their values are references, so the original comment about comparing the values that the references …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in String a ="SMS Message " or String a = new String ("SMS Message")?

    Hi hannahaddad There is nothing wrong with your post, but please be aware when answering Ermina. He/She has a history of posting homework questions and expecting someone to provide the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in String a ="SMS Message " or String a = new String ("SMS Message")?

    a and b are reference variables. The == operator for references tests if those two references are equal - ie that they both refer to the same object. Read the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Consider above code segment

    Did you execute that code? I thought not. Try running it - it *does* generate the output `they are equal` It looks like you are asking the wrong question.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in notion of event driven architecture JAVA

    Just google for it. The WikiPedia article on "event driven architecture" has a section specifically about Java Swing GUIs
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to create a stand alone java Desktop application ??

    "might exist in the JavaFX APIs but I don't have those installed here" That's very worrying from a security viewpoint. JavaFX is included with Java 7 update 6 and all …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help with creating menu system

    yes, it goes like this (pseudo code) input = "" while (input is not "exit") prompt user with menu choices get user input if (input is abc) do task abc …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help with creating menu system

    OK. You don't need to use a switch, you can do the same thing with a lot of if tests. Similarly, you don't need break, you can use a while …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help with creating menu system

    Start a loop Print the menu using System.out.println Get the user's input using a Scanner if the input was "exit" then break out of the loop use a switch to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in error in playing media files in java.

    Java support for media has beena shambles inthe past - JMF never worked properly. The good news is that JavaFX is now a standard component in all the current versions …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Help with arrays

    Can't guarantee how quickly I can respond, but yes, definitely. Glad to help.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Help with arrays

    romdan doesn't seem to have contributed to his homework discussion at all, so it would be a pity to post a complete solution for him to copy and get the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in search double linked list

    No. This is not a "we do your homework" site. I will help you to learn how to do it. Let's suppose your list has a variable for the first …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in search double linked list

    Same as searching any other list. Start with the first element, use a loop to check each element to see if it's the one you want.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in search double linked list

    I have no idea what that last post means. I know it's not easy writing in a foreign language, but please try to explain completely.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Help with arrays

    There's a much simpler solution that stultusk's - no need for two arrays or sorting Remember that chars in Java are integer values, and the alphbetic letters are represented by …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in search double linked list

    Same as searching any other list. Start with the first entry, use a loop to check each entry to see if it's the one you want.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in AddingOdd Numbers Recusively

    IK would imagine (with a high dehgree of confidence) that this was set as a training exercise in simple recursion.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in AddingOdd Numbers Recusively

    Because that's not a recursive solution?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java type mismatch

    Eclipse is always slow to update for Java updates (although it has supported 1.7 for years, so that's no excuse). NetBeans is always up to date, including beta versions to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java type mismatch

    Yes, 1.6 is no longer supported, and security bugs in 1.6 are not fixed any more. It's ***essential*** that you update to a supported version - 1.8 or the latest …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Marked Solved Status for AddingOdd Numbers Recusively

    Im trying to add odd numbers recursively from n to m but its not working . im sure its in the recursive logic on how im passing the arguments or …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in new to java, IDE wont run any java programs.

    No, no, not an idiot. We've all done that, or something like it.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in NullPointerException when inserting item into a linked list

    That implies that `last` is null when that line is executed, as only the `last.next` expression will generate an NPE. That would be the case if the while loop on …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in number

    What's wrong with `d.add(b);` ? But be clear: b is NOT 3, it's not even a nunber. It's an instance of the class f that contains an int whose value …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Trouble calculating the minimum distance between points

    if(minDistance == 0) { minDistance = distance; Not such a good idea if two of the points are at the same position (and nobody has said they can't be), in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in number

    > in this method i do not want to print anything. > i want two add two number Yes, I know that. I'm not going to do your homework by …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in number

    In your method you are passed an instance of `f` and you need to access that instance's value of `number`. How you do that depends on how the class `f` …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Text extraction from a text file without duplication in Java Scanner & Map

    Nobody here knows your level of experience, so nobody knows what kind of "assistance" you need. If you cannot ask specific questions then all I can suggest is that you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Text extraction from a text file without duplication in Java Scanner & Map

    You only need one Scanner. You don't need an Iterator to use a Scanner. Before posting code here, compile it and deal with as many of the compiler errors as …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Classes

    You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to sepp2k in Differences between the following declarations

    Yes, `cup1` is an object (or rather it's a variable referring to an object - just like `cup2`). The biggest difference between `cup1` and `cup2` is that, if the `Coffee` …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Differences between the following declarations

    (Edit) I'm very sorry. I just re-read your post and it was completely correct. I just didn't read it properly. My mistake.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Trouble calculating the minimum distance between points

    Look at your initial value for minDistance. Do you think you will ever find a smaller value than that? So the if test on line 10 will always be false. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How To Center Labels in Panels

    Centering things is a responsiblility of the layout manager. Have a look at [this](http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html) and chose a layout manager that handles sizing & centering the way you want. Note also …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in 2D Side Scroller Collision Detection

    > The player would be moving, so how would you determine which object is the closest since you wouldnt just want to check if the player is colliding with all …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Find the boolean product of two matrices

    You can use parens to control the order of execution, eg ((a && b) || (c && d))

The End.