7,116 Posted Topics

Member Avatar for dimitrilc

Why promote the use of DriverManager.getConnection when, to quote Oracle's documentation, "a DataSource object is the preferred means of getting a connection." as of Java 1.4?

Member Avatar for dimitrilc
2
180
Member Avatar for Zunnie

You have created a little class to hold the item names and prices. That's what any Java programmer would instinctively do. The problem is that the specification you have been given tells you to create two parallel arrays. Presumably you teacher is assuming that you haven't learned about classes yet? …

Member Avatar for Reverend Jim
0
272
Member Avatar for Programmer18

Build the process with ProcessBuilder. Start the process. Star at 30 minute Timer. Get the available results as they are written to the process' output stream (may need to code the script to display results as they are created). When the Timer fires terminateForcibly() the process.

Member Avatar for JamesCherrill
0
98
Member Avatar for Austin_11

DO you have any explanation for creating 52 variables, 52 if tests etc when a simple array or a map<char, int> would be so much better? And why use strings to hold single chars?

Member Avatar for rproffitt
1
58
Member Avatar for Braxy

You really should learn how to use arrays and maps before posting any more repetitive code (eg 147-178).

Member Avatar for Schol-R-LEA
0
177
Member Avatar for Yolie_b

Please let us know the email address for your teacher so we can submit the code directly to him/her and save you all that tedious copy/pasting. I'm sure you'll get an A+ for finding such a cunning way to handle the assignment.

Member Avatar for toneewa
-1
305
Member Avatar for Bright_5

> 14.31 has number 1 on the its integer side and a 4 on its decimal side, hence its a variant of 1.4. ???

Member Avatar for Bright_5
0
90
Member Avatar for Ethan_145

With 5000 soldiers that should be 5000 random numbers. The 1/15000 chance requires just one random number.

Member Avatar for toneewa
0
508
Member Avatar for N_765

You didn't say anything about the error. Is it line 38 - invalid syntax?

Member Avatar for zemiak
0
75
Member Avatar for Shephard_1

Sounds like you had failed to provide a meaningful toString() method for the MArry class, so it's just inheriting the default toString() from Object, which just returns the object's hash, which is typically it's memory address. Overide `public String toString()` in your MArry class to return a String that represents …

Member Avatar for JamesCherrill
0
24
Member Avatar for pritaeas

In Outlook you can configure the outgoing server(s) to be whatever you want (eg Google). There's absolutely no requirement to use outlook.com or any other particular server.

Member Avatar for pritaeas
0
61
Member Avatar for Wafflez

The last time you posted a data file lines 2 and 3 were the same. If the user/pw matched those lines you would get two Booking forms. Lines 55-65 should really be replaced by a method call, eg `isLoginSuccess = isValidUSerAndPassword(user, pass);` .... and refactor the user/pw validation code out …

Member Avatar for JamesCherrill
0
45
Member Avatar for Wafflez

You call the constructor for the new frame. That creates the frame but it does not display it. You also need to call `setVisible(true)` on the new frame. See line 446 for example.

Member Avatar for Wafflez
0
102
Member Avatar for Wafflez

Java arrays are zero-based, so the two array elements created by `line.split` are [0] and [1], not [1] and [2]

Member Avatar for Wafflez
0
104
Member Avatar for Mr.M
Member Avatar for mihailbog245
Member Avatar for JamesCherrill
0
161
Member Avatar for Dani

My ambitions to do a PhD in Theoretical Physics were destroyed when I discovered the joys of cannabis in 1968. My resulting BSc grade left me looking for a job. IBM offered me one as something called a "trainee programmer" which sounded quite interesting. The rest is history...

Member Avatar for rproffitt
2
94
Member Avatar for MichaL_11

To make your Ukley class sortable you make it implement Comparable. Comparable is an interface with one method - compareTo(other) - that you implement by comparing the year, then the month etc. Once you do that you can use Collections.sort to sort any list of Ukleys. Check the web for …

Member Avatar for JamesCherrill
0
33
Member Avatar for nouraaaaa

You are almost there for the yes/no. You correctly read the user's input into the variable N, but then you compare the wrong variable (n) with "No" and `"Yes". It really helps if you give variables meaningful names because the code is then easier to read, and mistakes are more …

Member Avatar for zemiak
0
83
Member Avatar for Валенти

> I need someone who can write the program and explain it to me Do you have the slightest idea what a university course is for? What are you studying - a BA in plagiarism? A BSc in cheating? Your C++ is there to teach you how to write programs …

Member Avatar for rproffitt
0
86
Member Avatar for Hoàng_32

When you call setup you always pass 0 as the index, so all the Tile instances are stored in tile[0] and all the other elements of tile are still null.

Member Avatar for JamesCherrill
0
160
Member Avatar for oriakhiosamu1

Yes, definitely a missing import. In general we would advise against importing whole libraries (eg. import java.util.* ) because you are adding a huge number of names that you don't know to your namespace. That can lead to really baffling errors when a name clashes (eg awt.List vs util.List), or …

Member Avatar for JamesCherrill
0
62
Member Avatar for Poweratgamer

It looks like you are using a directory inside c:\Program Files\ for your own files. That's never a good idea. Create a directory in your home for such use. Make sure that's the working dir in your command prompt. Make sure the JDK dir with javac.exe etc is in your …

Member Avatar for jwenting
0
157
Member Avatar for nouraaaaa
Member Avatar for SA_361

The error is in the Interface class, but I can't see the code for that. The exception appears to be telling you that you have passed a null value for location when trying to create an ImageIcon.

Member Avatar for JamesCherrill
0
868
Member Avatar for dgrovespdxdgpdx

You have options here: Populate the JPane with two JPanes left and right (use the default FlowLayout) then populate the left pane with the canvas and right pane with a vertical stack of components (use a BoxLayout or a GridLayout). or GridBagLayout will do it all. Steep learning curve but …

Member Avatar for jwenting
0
118
Member Avatar for Bill_47

Given some way to set memory bytes, then it's totally possible. I did something like that with an IBM System 7 process control machine when we were preparing low-level software around 1970 in preparation for the first hardware shipments. It didn't even have an assembler at that time, so I …

Member Avatar for Schol-R-LEA
0
93
Member Avatar for phie1313
Member Avatar for dubadub

That is really impressive. Look like you are doing an amazing job! Are you looking for help here, and if so what can we do?

Member Avatar for jwenting
1
375
Member Avatar for Hugh Nelsons

> roulette wheels generally have slots with both a color and a number, and you have to get both right to pay off Each number is red or black according to a fixed pattern: "In number ranges from 1 to 10 and 19 to 28, odd numbers are red and …

Member Avatar for JamesCherrill
-1
66
Member Avatar for Just_3

It's not clear what yo are asking... can you explain your question in more detail?

Member Avatar for JamesCherrill
0
76
Member Avatar for mc8888

Well done. You posted *exactly* the same question as the first post in this old thread. I guess you didn't read the complete discussion, or the complete solution in the last post. Then you asked for "help" without saying what help you needed. People here wil help you, but you …

Member Avatar for Zain_12
0
6K
Member Avatar for aouinasara77

Assuming that your results should include "project management" rather than "project", then it looks like the logic is something like: for each word in all words if the word is in keywords and the previous word is in keywords the previous word and the word form a multi-keyword (etc for …

Member Avatar for JamesCherrill
0
71
Member Avatar for ____

wow, all that uncommented code with zero error handling just to replace `getDesktop().browse(uri);`

Member Avatar for JamesCherrill
0
113
Member Avatar for Napoleon_1
Member Avatar for You Have Been C

99% of the time this problem arises because the keyboard focus is not on the component that has the listener. It can often be fixed by the slightly tacky approach of adding the listener to all the JComponents involved. The better solution is explained in [this](https://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html) Oracle tutorial. ps: looping …

Member Avatar for ivy.inc.Hugh
1
269
Member Avatar for LianaN

paintComponent still only paints the first image g2D.drawImage(bi, x, y, this); The draws to big and big2 don't achieve anythig as far as I can see

Member Avatar for ivy.inc.Hugh
1
2K
Member Avatar for moosh101
Member Avatar for amontellano

The instructions are pretty clear and detailed, so what exactly is stopping you from making progress? Ps: what is the ConsoleInput class? It’s not part of the Java SE API.

Member Avatar for amontellano
0
36
Member Avatar for sadbin hoque

SimpleDateFormate? Where does that come from? Did you mean the standard API class SimpleDateFormat ?

Member Avatar for JamesCherrill
0
201
Member Avatar for ervineuer

I've been building Java GUIs since the mid 90's and in my opinion the best builder is no builder. Yes, you can drag and drop a pile of controls into a layout, and get a few hundred lines of incomprehensible code, but as soon as you start to think about …

Member Avatar for jwenting
0
83
Member Avatar for Dani

I guess I would count as a "seasoned member". So what would I get that would be worth $60 in a year? I can't see the value proposition.

Member Avatar for Dani
2
446
Member Avatar for Xozz

> VT-x is disabled in the BIOS Seems clear enough. Re-boot into your BIOS configuration and enable VT-x

Member Avatar for rofa_1
0
534
Member Avatar for MickeyD

According to Dell's website the Windows licence is specifoc to each particular machine and its details are burned into the BIOS. Is it possible that the original OS was Home edition (in which case the licence is not valid for Pro)? Have you tried installing a Home edition?

Member Avatar for rofa_1
0
383
Member Avatar for federerforehand

Does anyone else believe that OP wrote that code in the 3 minutes between Norms' reply and his posting it?

Member Avatar for Jerry_23
-2
4K
Member Avatar for nextsmm

In theory you should be able to code and test on a sufficiently up-market Android phone. There are also quite few apps that teach you the basics of programming on Android or iPhones. They coud be a good place to start. In any case it's going to be painful working …

Member Avatar for DGPickett
3
236
Member Avatar for Ghostzy
Member Avatar for JamesCherrill
-1
131
Member Avatar for shak187
Member Avatar for AbstractEden

Check your switch, and remember that execution wuill drop through to the next clause unless you execute a break or a return...

Member Avatar for alex205
0
3K
Member Avatar for Kurosaki

The End.