7,116 Posted Topics
Re: questionrandomizer() isn't going to do anthing because you never call it. | |
Re: Which line is generating the Exception? The third `next()`? Scanner looks like a good idea for beginners to use, but in reality it's full of little traps that cause all kinds of problems (eg: if you have delimiter of "/" then a new line is no longer a delimiter [Hint!]), … | |
Re: Sandeep: You just copy/pasted your assignments 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 here. There are lots of people here who will freely give their time to help you become the best … | |
Re: // call this once that's right. You call it twice. the number you read first (line 18) is never used, and is immediately replaced by the second number (line 23). All you need is to remove line 18, and initialise `number` to some dummy value (not zero) so the while … | |
Re: *In my opinion* the Eclipse debugger has a very steep learning curve, and is far too difficult for someone who hasn't started learning about threads yet. For a beginner I think it's far better to stick to what they already know, and put in lots of `System.out.println` calls. | |
Re: What exacetly do you need clarified? | |
Re: Is this Android code? If so, just note that `Time` is full of problems and thus was deprecated in API level 22 in favour of `GregorianCalendar`. (Which in turn was replaced by the new date/time package in Java 8) | |
Re: Someone else is going to have to read and understand it. Whatever the requirements are now, they will change. | |
Re: Are you looking for a tutorial? There are lots on the web. | |
Re: What does the call to that method look like and how is its parameter declared? I don't see how you can pass a `Map<String, LinkedList>` to a method that requires a `Map<String, String>` @Slavi: yes, that would get rid of this particular error, but it wouldn't help. Looking at the … | |
Re: Method 1: (Object...params) That's as unhelpful and error-prone method signature as I can imagine. You have no idea what the arguments should be, and the compiler can do nothing to help you. Method 2: (Class<T> entityClass,String name, String idName,String value,String id) Now at least I know what the arguments are … | |
Re: All that `apply()` does is to set a listener. For the `radius` method you need an actual numeric value, which `apply()` does not supply. I'm curious about this mistake. What did you hope would happen if your code was able to execute the way you intended? | |
Re: Some comments: That code is hard to read because: The indentation is all over the place - use NetBeans to forma the code properly You ignore Java naming conventions - class names should always start with a Capital letter, variables with a lower case letter Declare the list as `ArrayList<Book> … | |
Re: What about it do you not understand? ps: You claim to be the author of that code, so how did you write it if you don't understand it? | |
Re: A list of Book objects is a very good start. You can add Books to it, or delete them, or update them by changing the values in their variables. For the changes you will probably need some kind of search method to get the right Book basd on its name … | |
Re: Personally I always want the complete stack trace, not just the error message | |
Re: Is it OK just on your LAN? If so, maybe you are using a dynamic DNS and that's a slow lookup??? | |
Re: Maybe created a class with the same name as a JRE class that was imported with a .* ? | |
Re: Maybe you have an earlier version of the code that started executing but has not terminated for some reason? Check your task manager for running versions of java.exe or javaw.exe If you are just using Files.move then there's no need to close anything. You only need to close input/output streams … | |
Re: If it is the case that: Parking, Loan etc are all a `kind-of` Workflow `and` There is a lot that's common to all of those, but each has it's own variations `and` You don't need to add new Workflows without updating the program `then` Define an abstract Workflow class with … | |
Re: "code like that is always bad." Actually that is the one place where an empty catch is often OK - inside a `finally` block where yoy are just trying to tidy up anything left untidy. | |
Re: This has all the same kinds of mistakes that we discussed in one of your earlier posts - eg almost-duplicated variables, results calculated but never used, results never calculated, no printout of the intermediate calulations. Please don't expect me to explain it all twice. This one looks even worse because … | |
Re: the host "www.getahead.ltd.uk" is currently unreachable what is it aboiut that mesage that you don't understand? | |
Re: Oh yes, far too often. 2 times out of 3 it seemed begtter to guess the external spec and re-code from scratch, 1 time in 3 try to fix it. Either way the real issue is to reverse engineer the external specification so you know exactly what it's *supposed* to … | |
Re: You really are not trying. Google JList tutorial. Go to the official Oracle tutorial. Go to the section called "Adding Items to and Removing Items from a List" | |
Re: Do you mean you want to MOVE the file from C: to D: ? | |
Re: Maybe you could use a 1 byte file and open it for exclusive access for use as a system-wide lock? | |
Re: You know the rules: try to do it yourslef. Post your best attempt and we'll help from there. | |
Re: A method can return a value, in which case you specify the type of the returned value in the method header, eg String convertToString() // returns a String but some methods do not return anything, so where you would normally specify the return type, you use the keyword "void" to … | |
Re: Apple OSX only runs on Macintoshes, and comes as standard with every Mac, so you never need to buy it. All the upgrades are also free (at least for now). | |
Re: On which line did it throw the exception? What was the file/path that you were processing at the time? | |
Re: Which line of the code is throwing that Exception? | |
Re: OK, I created that class. Now would you like me to send it directly to your teacher on your behalf, or would you prefer to try to do it yourself? | |
Re: I like BlMath2015 It also establishes a system for naming future releases... | |
Re: Yes, there's no ODBC in current Java. Fortunately there's an open source JDBC Access driver http://ucanaccess.sourceforge.net/site.html that seems to have a good reputation. Ps: That call to Class.forName (line 21) (and the problems it can spawn) has been obsolete for many years now. Don't use it. It just shows how … | |
Re: Read the [DaniWeb rules](https://www.daniweb.com/community/rules) If you want help you must show effort Post in full-sentence English Now... start again | |
Re: I believe there is not. The best you could do is to send/receive a known quantity of data and see how long it takes. By comparing a small quantity with a larger one you caould eliminate latency and fixed overheads to get an approximate actual speed at that instant. | |
Re: Use a [PrintStream](http://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html) Just create a PrintStream using your File and print to it just like you print to System.out Something like: File out = new File( etc etc); PrintStream p = new PrintStream(out); p.println("Invoice no=" + invoiceNum); | |
Re: DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules Post what you have done so far and someone will help you from there. | |
Re: JFrame's DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE are inherited from WindowConstants (`JFrame implements WindowConstants`) EXIT_ON_CLOSE seems a historical oddity - it was first implemented in JFrame in Java 1.3, but then added to WindowConstants in Java 1.4 anyway. So the answer to your question is: it makes no difference. | |
Re: Hi Aditya Yes, we can help you - but remember that you must make an effort and try. The more you try, the more we will help you. If you are new to coding then videoconferencing is going to be very difficult for you. It involves media handling, client-server computing, … | |
Re: 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 here. There are lots of people here who will freely give their time to help you become the best Java … | |
Re: I think that will catch problems where the OS was not able to load and start the process. I think it will not catch any problems that the new process encounters(eg invalid run parameter values) after it starts to execute. So, you asked two questions: "Relying on Try-Catch enough to … | |
Re: Exactly what help do you need? | |
Re: Are you storing the data in a SQL database, or in files inside a directory??? | |
Re: The reporting and messaging is not difficult at all. Identifying when a game is started or closed could be more difficult, depending on what the operating system is, and whether the games in question have any software hooks that you could use to monitor them. | |
Re: I didn't answer because I didn't understand the question! Can you explain in english or preudo-code what you are trying to achieve? Eg, why not if (hasToMoveRight) moveRight(); etc? | |
Re: Why a loop? Why not just create a sum formula with one relative bound and one absolute, eg cell f1 =sum(f1:$O1) and replicate that by dragging it across the remaining columns. | |
Re: I've always used GridBagLayout and it's never let me down. What's "not ideal" about it for your application? |
The End.