• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why Java is not support multiple inheritance?

    Current versions of Java do support multiple inheritance from interfaces. So your question is in error.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Sorting ArrayList with a comparator, how to

    What'ss the problem? You sort the collection based on the names, and you get your collection sorted in name order. What did you expect? ps: Your two "override" comments are …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How can I replace the occurrence of a letter within a string with a number

    Why the parseInts? Don't you just want to insert the character that represents 1,2,3 etc? And why the === (identity test) rather than a simple == (equals)?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in can I get a list of all http sites in the world?

    All http sites in the world? Do you have any idea how many terabytes (zettabytes?) that is?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to use method udpclient.send()

    Before you do anything else fix your empty catch blocks by printing the complete details of any exception.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to raviseo1 in setState error when onPress Text component

    use this.setState() instead of setState().
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Retrieve data from firebase between two dates

    I don't know firebase, but as nobobdy else has answered.... MAYBE there's a time attached to that data, eg 30-5-2019 10am 31-5-2019 11am and your query is defaulting to midnight, …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in want to show only one object in an array

    This is a continuation of your previous post, so you should not create a new topic. Just add to your existing topic. Anyway: Printing "not found" inside the loop will …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Read a XML as object via c or c++.

    JDom2 for Java can do that kind of thing... easy to use but still has the Java trademark verbosity. Example: http://www.studytrails.com/java/xml/jdom2/java-xml-jdom2-example-usage/
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in only showing first user input

    You need a loop in which you compare the search string with each entry in the array until you find a match, or exit the loop having not found any …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in creating date class and increment

    I hope you have the permission of the copyright owner to publish their work in its entirity withoit any pretence of fair use, comment etc. Or are your homework assignment …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in printing array list

    Line 92 You just print the last item. Think about how to use the loop variable ` a` Also Line 77 If you want to test for two Strings containing …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in run time algorithm

    It looks like a mathematical solution is v. hard, so maybe in a C.S. context it's asking for a numerical solution (approximation) using some kind of iterative approach? ps: It …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is a good way to go about designing this?

    How about something to manage Users... logon, password verification, privileges/authorisations, preferences etc You could have it as a API then optionally layer a GUI on top.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Hey all! First post,Just nee help figuring this out.

    Here's some pseudo-code to point you in the right direction do get two random numbers 1-6 sum them together while( the sum is not 7 or 11)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Most effective programming language ?

    > That would be 531 441 different combinations, ... on a machine that can do a BILLION if tests in a second. Do the sums. Unless there's some aspect of …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in configured with different nullability

    Can you post the complete exact error message please?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Most effective programming language ?

    > C Language is used to be considered as most powerful programming language. ... which is why everyone uses it for any kind of application all the time. No, wait …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Most effective programming language ?

    If you only have 243 combinations to process then you could program it in anything and it would still take a millisecond For performance to be an issue you need …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to RuhiAngel in Different between !.equals and !=

    By and large the two equivalents() and "==" administrator in Java are utilized to contrast objects with check equity yet here are a portion of the contrasts between the two: …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in why am i getting empty list when i call it from another class?

    I can't see any obvious errors in that code, but to go any further we would need to understand the sequence of events that make up your test case.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java Inheritance problem approach

    It's not a problem, and you don't have to solve it. Just do what you have been told. You have been given a very clear set of step-by-step instructions. Just …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Little project in Java menu not working please help.

    OK. Your main method is in the inner class InputMenu. It needs to be in the public outer class PersonalProgram
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Little project in Java menu not working please help.

    Don't just say "getting errors:, tell us the complete error messages or worng behaviours. Anyway, one thing is that you have two different Scanners both using System.in, which is guaranteed …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in weather data program

    The qiestion isn't very clear, but it sounds like you need to update the window's contents after the window has alteady been displayed? If so you need to separate the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java.lang.NumberFormatException: For input string

    It looks like whatever is in` rt.data` at line 14 is not a valid string representation of an integer. But since you don't show that data there's nothing more anyone …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in ORA-00907: missing right parenthesis

    `FOREING` spelling?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in ORA-00907: missing right parenthesis

    Are you missing a comma after ID_DOMAB NUMBER(10) ?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What does DaniWeb mean to you?

    > Those that I can answer with some effort that give me a chance to learn something new. Oh yes. I wish I'd said that as well. 100% agree.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What does DaniWeb mean to you?

    > what you get out of your membership? I'm now retired with 50 years of programming experience about to follow me into the grave. What I get from DaniWeb is …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in hello and assalamu alikum . i am student ..

    > AMNA_5 commented: but i have only 2 hour Then I'm sorry, but you have left it far too late. All you can do is to learn from this mistake …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in hello and assalamu alikum . i am student ..

    Hello. We can help you learn how to do this, but we won’t do it for you. What have you got so far?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Exception in Thread Error -Java Main Method

    You have 2 Scanners both based on System.in At the end of the accept method you close one of them Closing a Scanner also closes the underlying stream (see API …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in A guest registration/reserve application

    That's a lot better! I don't want to give you your homework, so here's an outline that illustrates the sort of structure you can use. Its an arithmetic app that …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in A guest registration/reserve application

    It looks like you stopped reading the instructions about half way down. That's always a fatal mistake. Go back to where it says "Specifications" and do what it says there. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Allow user to enter word found in grid

    In that case there's no need for marking visited, nor for recursion. Simply for each square check the horizontal, vertical and diagonal directions until a word is found or you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Modify a code and add to my code

    What's your objective here? If you just want to get something working quickly then a bit of copy/paste from the web may help Or... you may be copying something that's …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Allow user to enter word found in grid

    That's a great start. Let us know how you get on with converting that into code. ps: You didn't say whether the word has to be in a straight line …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Allow user to enter word found in grid

    Switch off your computer. Get a paper and a pencil. Draw a letter grid and find all the words in it. Write down exactly how you did that (you may …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Allow user to enter word found in grid

    Think about how you would do this with a pen and paper... You're going to have to start at each point in the grid and search in up to 8 …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java scanner input error

    There's nothing wrong in the code you posted, so the problem lies somewhere else. Without the whole code and the actual input there's nothing more we can do. But in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in search Customer by Name is not printing

    Write some code that searches for a known customer and prints the result! It's a mistake that all learners make: they write far to much code before they start testing. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in search Customer by Name is not printing

    I canonly see one call to searchCustomersByName, and that passes null as the parameter. I can't see any code to print it.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in reader-writer problem in java

    So just start one writer and one reader thread instead of the 3 readers in that code. Set the priority of the threads to give the priority you want. What's …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to joshuapatel in Polite rant re posting!!

    I am no Mac expert, just an old dude who has had experience with Mac computers since 1995. I read posts here to see if there are problems to which …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is wrong with my multiple choice quiz Java code?

    Looking at that code I think I may have been pushing you in a direction that you're not ready for yet. I assumed too much about your familiarity with loops …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is wrong with my multiple choice quiz Java code?

    That's kinda half-way there. It needs to be more like (incomplete code) Button answers[] = new Button[4]; for (int i = 0, i<answers.length; i++) { answers[i] = ... fimdViewById(... buttonIDs[i] …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is wrong with my multiple choice quiz Java code?

    This latest also repeats almost identical code, which is again very bad design. It should be something like `public int getChoice(int questionNumber, int choiceNumber) {...` In general your program should …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is wrong with my multiple choice quiz Java code?

    You have the same block of code repeated with only small changes to the variables. What happens with 20 questions? Do you repeat the same code 20 times? What heppens …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is wrong with my multiple choice quiz Java code?

    Presumably you have a loop in which the quesions are asked and answered? If so just maintain a counter of how many questions and exit the loop after 20,eg (pseudocode) …

The End.