• Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Using Delimiters to extract multiple characters

    It splits the data into an array of Strings, so the first col's data is in array[0], the second in array[1] etc. ps: Re your SQL code: You create a …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Java Editions

    Java EE is a superset of Java SE that has tools for Enterprise-scale application development and deployment. Java SE includes all you need to perform transactions on popular SQL databases. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Using Delimiters to extract multiple characters

    Use String's `split` method http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help finding whats missing

    It may sound slow, but believe me, it's even slower to keep trying random changes to code when you don't understand what the code should be doing... ps: Why two …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help finding whats missing

    Switch off your computer. Get some paper and pencil. Work through a couple of short examples on paper until you have a solid grasp of what to write down and …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in need help finding whats missing

    Line 16 you create a new array of ints. You don't provide any initialisation, so all the elements are 0. Lines 17-25 are only executed if the array elements are …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in what can I do to make this program work?

    All the code for prompting and printing is inside that loop, so it will do all that exactly 3 times, then it leaves the loop (line 58), which is the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in what can I do to make this program work?

    Look at your line 11. What do you think that does?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in * pattern in java

    There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How to get the biggest digit from a number?

    If you just copy someone else's solution you will not improve your Java skills. Try to do it yourself. That's the only way to improve.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Server with Java

    Java Sockets? http://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I want to copy TextArea text to a File...

    It is called from the event handler, but I can't see the necessary call to addActionListener to make that work!
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I want to copy TextArea text to a File...

    No need for a loop - the write method has a variant that takes an array of bytes (see the API doc). flush() is more interesting. You would expect that …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in I want to copy TextArea text to a File...

    function12 throws an Exception, but you never catch or throw it upwards when you call that method
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Connecting MySQL with Java Tutorials?

    For MySQL I think you need to download their JDBC connector, latest version [here](http://www.http://dev.mysql.com/downloads/connector/j)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Deal or No Deal Help!!

    It's a TV game show. [WikiPedia has the details](http://en.wikipedia.org/wiki/Deal_or_No_Deal_(U.S._game_show)) ps If ever a piece of code needed to use arrays, it's this one!
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java

    Yes, people here will help you to write your Java code. What help do you need exactly? (But be aware that "help you" does not mean "do it for you".)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in static func.'s!

    OK. That explains it. For some bizarre reason you have to ask the compiler to check your code properly by adding the `-Xlint` option. IMHO that should have been the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in static func.'s!

    Mine was Java 8 on Yosemite did you use -Xlint?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in static func.'s!

    Hi Compiling from the command prompt gives you a "warning: [static] static method should be qualified by type name, A, instead of by an expression" (provided you are using -Xlint, …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Connecting MySQL with Java Tutorials?

    Just saw milil's post - Beware that tutorial if you want current info. It starts with `classForName`, which became obsolete in 2006 (if not earlier). Telling you to use classForName …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in static func.'s!

    yes, really. NetBeans and Eclipse both give a compile-time warning for accessing a static method via an instance ref. It is, as you say, valid but confusing.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Connecting MySQL with Java Tutorials?

    ^ like he said. For learning, unles you are already a MySQL admin fiend, I can recommend using the JavaDB that came with your JDK, and NetBeans which has support …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Connecting MySQL with Java Tutorials?

    The definitive Oracle tutorials are kept up to date, and include MySQL... http://docs.oracle.com/javase/tutorial/jdbc/index.html AFAIK there were no significant SQL-related changes in JDK 8.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in stacks implementation

    Soiunds like a homework question to me! Read the [DaniWeb Rules](https://www.daniweb.com/community/rules) What do **you** think the answer is?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Algorithm selection

    Just think of the number in in its binary representation. What question will tell you the value of the first bit? Knowing that, what question will tell you the value …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in static func.'s!

    It means the method is a class method as opposed to an instance method. You do not need an instance of the class to use that method, and the method …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What is the most powerful programming language?

    Hey! He's entitled to his opinion. (Although his post would have been better if he had supplied some justification for his opinion.)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Random lottery number generator

    stultuske may not be the most diplomatic person here, but his message is right... DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in printing array of char.'s

    An array of chars is one thing, a String is a differemt thing. Arrays of chars are not very often used - all you can do is iterate through the …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in oop code for persona detail using c++

    I can't comment on the C++, but as an OO design it seems to confuse two different objects. You have a Person type (calling it "Record" is just unhelpful). Each …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in What's wrong with program?

    Line 60: shouldn't you be adding the costs, not the sizes?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Encryption button is not working

    ps That style of having one giant actionPerformed is a horrible hard-to-read error-prone hang-over from the Java of 10 years ago. In 2015 it’s far better to use the facilities …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Computing a final grade

    There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Bank Account using superclass

    ^ like stultuske says. But anyway - looks like problems with the constructors. When you create a subclass like that you typically need a constructor that has all the values …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Encryption button is not working

    That's still a useless description of your problem. But anyway - if you were to add an action listener to that button it may help.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to sepp2k in instance method

    > If static modifier is not applied before does it makes it an instance method ? Yes.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How useful is Java for Game Development?

    SQL isn't going to loom large in a Game. Java hasn't been used much in the past for games, but modern Java and JavaFX is no worse than c#/.NET, and …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Pseudo Code - FloatPrice

    It won't work in java any better than it will in C++. tenths and hundredths can't be represented exactly in a binary floating point representation, so this naive approach will …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Application to Find Smallest integer in Java

    There's nothing wrong with 9...9 as a large int, but `Integer.MAX_VALUE` is the largest possible int, and nicely self-documenting.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how does JOptionPane confirm dialog box work

    They are on oracles site. Just google them. What's integer.value()?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Thousand threads write to one text file simultaneously

    See previous posts
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how does JOptionPane confirm dialog box work

    The API doc includes example code. The Oracle tutorials cover this as well. Yes, it works in a program
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Thousand threads write to one text file simultaneously

    From what you have said so far I would use an SQL database, yes.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Thousand threads write to one text file simultaneously

    There is no problem here with free databases. JavaDB comes with the JDK as standard, and is certainly up to this task, as Is MySQL and others.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Thousand threads write to one text file simultaneously

    As sos said - if you had explained the scenario earlier it would have saved a lot of time. With what we now know... Lots of files is about as …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Thousand threads write to one text file simultaneously

    Ok. We discussed two solutions to that (queue vs lock). Both will work. Which you chose depends on the number of files etc. If there are many files then starting …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Thousand threads write to one text file simultaneously

    It seems every post you contradict your previous post! Is it many files simultaneously or is it a thousand clients and one file? You can't chose the right architecture unless …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Printing JTable with header image and footer image

    It's not something that I've ever done, so I can't really help. Sorry. J
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Printing JTable with header image and footer image

    Did someone speak my Name? Yes, except a JTable in the middle, not a hand made grid. I don't know if you can do that with the print methods in …

The End.