7,116 Posted Topics

Member Avatar for EarhawkPH
Member Avatar for EarhawkPH
0
177
Member Avatar for debee

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!]), …

Member Avatar for JamesCherrill
0
208
Member Avatar for Sandeep_14

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 …

Member Avatar for David W
-2
133
Member Avatar for Tanner_1

// 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 …

Member Avatar for JamesCherrill
0
196
Member Avatar for divinity02

*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.

Member Avatar for divinity02
0
193
Member Avatar for gtel
Member Avatar for saurabh.mehta.33234

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)

Member Avatar for Taywin
0
384
Member Avatar for Ajay Negi

Someone else is going to have to read and understand it. Whatever the requirements are now, they will change.

Member Avatar for stultuske
0
235
Member Avatar for Rashee
Member Avatar for Kert

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 …

Member Avatar for newcoder310
0
357
Member Avatar for samantha2015

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 …

Member Avatar for jwenting
0
212
Member Avatar for Stefce

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?

Member Avatar for Stefce
0
254
Member Avatar for shahera.arafat

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> …

Member Avatar for shahera.arafat
0
222
Member Avatar for hadisur_rahman

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?

Member Avatar for stultuske
0
326
Member Avatar for shahera.arafat

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 …

Member Avatar for JamesCherrill
0
277
Member Avatar for newcoder310
Member Avatar for JamesCherrill
0
2K
Member Avatar for centenond

Is it OK just on your LAN? If so, maybe you are using a dynamic DNS and that's a slow lookup???

Member Avatar for centenond
0
304
Member Avatar for newcoder310

Maybe created a class with the same name as a JRE class that was imported with a .* ?

Member Avatar for peter_budo
0
265
Member Avatar for altjen

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for samantha2015

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 …

Member Avatar for samantha2015
0
2K
Member Avatar for altjen

"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.

Member Avatar for stultuske
0
921
Member Avatar for divinity02

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 …

Member Avatar for JamesCherrill
0
203
Member Avatar for hwoarang69
Member Avatar for JamesCherrill
0
386
Member Avatar for NemeXis

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 …

Member Avatar for JamesCherrill
0
338
Member Avatar for Saboor880

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"

Member Avatar for JamesCherrill
0
96
Member Avatar for altjen
Member Avatar for Darth Vader
Member Avatar for JamesCherrill
0
307
Member Avatar for divinity02

You know the rules: try to do it yourslef. Post your best attempt and we'll help from there.

Member Avatar for JamesCherrill
0
191
Member Avatar for Parvathiapril8
Re: Void

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 …

Member Avatar for JamesCherrill
0
242
Member Avatar for vegaseat

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).

Member Avatar for Lardmeister
2
509
Member Avatar for Munazza_1

On which line did it throw the exception? What was the file/path that you were processing at the time?

Member Avatar for JamesCherrill
0
2K
Member Avatar for Saboor880
Member Avatar for Saboor880
Member Avatar for അരുൺ

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?

Member Avatar for JamesCherrill
0
1K
Member Avatar for galhajaj

I like BlMath2015 It also establishes a system for naming future releases...

Member Avatar for JamesCherrill
0
143
Member Avatar for hwoarang69

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 …

Member Avatar for ~s.o.s~
0
662
Member Avatar for Jhajha

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

Member Avatar for JamesCherrill
-1
67
Member Avatar for Vansh_2

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.

Member Avatar for Karan_8
0
540
Member Avatar for altjen

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);

Member Avatar for JamesCherrill
0
249
Member Avatar for Kate_2
Re: Java

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.

Member Avatar for JamesCherrill
0
72
Member Avatar for Doogledude123

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.

Member Avatar for JamesCherrill
0
395
Member Avatar for Aditya0025

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, …

Member Avatar for jwenting
0
189
Member Avatar for 9ja boy

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 …

Member Avatar for JamesCherrill
-1
329
Member Avatar for Doogledude123

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 …

Member Avatar for jwenting
0
288
Member Avatar for mike chibundi
Member Avatar for altjen
Member Avatar for altjen
0
274
Member Avatar for Dan_4

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.

Member Avatar for JamesCherrill
0
260
Member Avatar for centenond

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?

Member Avatar for Schol-R-LEA
0
172
Member Avatar for PinoyDev

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.

Member Avatar for JamesCherrill
0
289
Member Avatar for Doogledude123

I've always used GridBagLayout and it's never let me down. What's "not ideal" about it for your application?

Member Avatar for JamesCherrill
0
309

The End.