-
Replied To a Post in New to Java programming need help with homework please
I had a quick scan over some of the content referenced by NebulaM57. Can't say I was very impressed Eg "static means that only a class can call for this … -
Replied To a Post in New to Java programming need help with homework please
Hi Yes, people here will help, but not many will bother to download a zip file from an unknown source! Post your code here (use the `code` button above the … -
Replied To a Post in how do i combine two objects together into one
There's zero information in that code about where the flag is being drawn, so it's hard or impossible to answer your question. Presumably the missing info is in the various … -
Replied To a Post in How to split personal names in python using pandas
Considering names like Gary Del Barco vs Sarah Michele Geller, or Richard Wayne Van Dyke vs Doris Mary Ann Kappelhoff (a.k.a.Doris Day), I suspect what you are asking is impossible … -
Replied To a Post in Fixing Java Code Errors
Maybe just keep with the calculator for a bit? (Small steps for an easy journey) a) Keep doing multiplications until the user signals "stop", eg by entering zero for eiher … -
Replied To a Post in Trying to Display info from Database into JTextfield but nothing is showing
Line 144, are you sure the result set is not empty? -
Replied To a Post in Difference betweeb two dates as number of days
Without knowing the values of the two times I can't comment. -
Replied To a Post in Does Java creates "is" functions for booleans in a class?
OK, it's just that you used `Object` in your first post When you say "got errors", *exactly* what error messages do yu see? -
Replied To a Post in Does Java creates "is" functions for booleans in a class?
You seem to be calling those methods as if they were class methods for the `Object` class... which they're not. -
Replied To a Post in How ordering files in package in java??
As far as I know you can't - it's alphabetical. And judging by the lack of responses it looks like nobody has any better answer. -
Replied To a Post in Difference betweeb two dates as number of days
ps You may be amused by answers 1, 2, and 5 on this Quora page... https://www.quora.com/What-is-the-most-complex-piece-of-code-written-for-a-function-that-is-seemingly-extremely-simple -
Replied To a Post in Difference betweeb two dates as number of days
Your earlierccode snippet is OK, althoug you may as well just divide by the number of mSec in a day. There may be some really obscure traps in there because … -
Replied To a Post in Difference betweeb two dates as number of days
Use Date's `toInstant()` method to convert your Dates to Instants, then proceed as above. `return ChronoUnit.DAYS.between(date1.toInstant(), date2.toInstant());` Couldn't be easier. -
Replied To a Post in Difference betweeb two dates as number of days
In Java 8 all your problems are solved! It includes a completely new package for handling dates, times, intervals etc based on everything that was wrong with the old classes, … -
Replied To a Post in Save a textfield data/values into mysql database.
Nice try Edson, but this thread is a year old, so your answer is too late. You should also update your Java knowledge. `Class.forName()` became osolete with JDBC4, *ten years … -
Replied To a Post in Java program : Compilation Error [Learning Level - Constructor and super]
Yes. `private` fields can only be accessed within the class where they are declared. You need a less restrictive access type such as `protected` or *`default`*. This tutorial expalins it … -
Replied To a Post in SQLServer_Netbeans
"There is also Class.forName is used" - is that how you interpret "In previous versions of JDBC, to obtain a connection, you first had to initialize your JDBC driver by … -
Replied To a Post in Text Based Mafia game
Hello Mynamo. DId you read this thread before replying? See the comment on the previous post. You are 8 years too late. -
Replied To a Post in How to get the reference of outer most class
So in `itemMethod` you need to know the instance of `Company` (or one of its subclasses) that called it? Unless there's already some data item or structure that holds that … -
Replied To a Post in SQLServer_Netbeans
You are using a seriously out-of-date source for your info. The whole Class.forName thing was replaced as of Java 1.4 or 1.5 (Yes, that's more than 10 years ago). Forget … -
Replied To a Post in Learn deep concepts of Java
> @James It doesn't talk about collections, threading etc. ??? The Oracle tutorials have *huge* sections on Colllections and on Threading - see the trails on Concurrency and Collections in … -
Replied To a Post in How to get the reference of outer most class
I'm not sure I understand what you are asking, but to call the `getName` instance method of the `ClassA` class you will need an instance of `ClassA`, as in `String … -
Replied To a Post in C++ project help me please
Yes. But you must show some effort first - post what you have done so far and explain why you are stuck so someone can give relevent help. -
Replied To a Post in 24 game algorithm
For the specific code posted above I agree. -
Replied To a Post in 24 game algorithm
Well. I'm following it again now... In my opinion, I would rather waste a few miliisecs of CPU than try to debug some highly optimised code that only works most … -
Replied To a Post in Static Get/Set Initialize When Needed - Does This Work?
The compiler has to include all those values in your runtime, so any saving is pretty illusionary. Exactly how many bytes/CPU cyles are you saving? As a percentage of the … -
Replied To a Post in project
People here will help, but you must be a lot more specific in your question. We do not know about your current skill level in C#, we do not know … -
Gave Reputation to Raul Perez in Learn deep concepts of Java
Java How To Program -
Undeleted a Post in Learn deep concepts of Java
Java How To Program -
Deleted a Post in Learn deep concepts of Java
Java How To Program -
Replied To a Post in Learn deep concepts of Java
In my opinion you can't beat the original Oracle tutorials http://docs.oracle.com/javase/tutorial/reallybigindex.html -
Replied To a Post in Java program : Unresolved compilation problems[Learning Level]
You have a spurious `.` between `String` and `id` on line 3 -
Replied To a Post in Java Printing Patterns using for-loops
Yes you can, IF you learn to program and take the time to think through how to do it. If you would like help with either of those please start … -
Replied To a Post in Help with Java Swing Paint app
Looks like `draw` is never initialised. -
Replied To a Post in what am i missing here
To be fair, nobody said you couldn't do it. We just suggested that your time may be better spent doing something that fits better with your talents. But well done … -
Replied To a Post in How read more than one file without rewrite bufferedreader more than once?
Either return a boolean from the method showing whether or not the "m" was found, or test the condition inside the method and call it for the next file from … -
Replied To a Post in How read more than one file without rewrite bufferedreader more than once?
Rubberman is right, but if you are still finding your way with writing simple methods then it's too soon for you to get into multiple threads. Do one thing at … -
Replied To a Post in How read more than one file without rewrite bufferedreader more than once?
It's as simple as void readFile(String fileName) { try { FileReader fr = new FileReader((fileName)); etc } then readFile("file_one.txt"); readFile("file_two.txt"); etc -
Replied To a Post in How read more than one file without rewrite bufferedreader more than once?
You simply put the code for one file into a method, taking the file name as a parameter. Then you can call that method as many times as you like, … -
Replied To a Post in Insert Rows in a Jtable imported from MySql
OK For that you need to override `isCellEditable` in your table model to return `true` for the cells you want to be editable by the user. See https://docs.oracle.com/javase/tutorial/uiswing/components/table.html#data ps: You … -
Replied To a Post in Help Generating All 3 Digit Numbers
OK. You just posted a completely pointless program that has no relevance to this (very old) thread. Did you realise its a pointless irrelevant piece of code, and just wanted … -
Replied To a Post in return v.compareTo(w) < 0; what influence does the "< 0" serve?
`compareTo` returns an int... v<w returns -1 v==w returns 0 v>w returns +1 so if v is less than w, `compareTo` will return -1, and line 3 will return `true`. … -
Replied To a Post in Insert Rows in a Jtable imported from MySql
Did you enable cell selection? `table.setCellSelectionEnabled(true);` -
Replied To a Post in How can I write lines that read from multiple files to one file in java?
Read my last post. -
Replied To a Post in How can I write lines that read from multiple files to one file in java?
Yes, keep trying! And remember, if you need help you should ALWAYS post the relevant code. -
Replied To a Post in Insert Rows in a Jtable imported from MySql
`changeSelection` is the right method, so there's something wrong in the way you are calling it. Without seeing the code I can't comment further. -
Replied To a Post in How can I write lines that read from multiple files to one file in java?
You know how to write one line (its in your code at line 59), so all you need to do is to place that inside your loop(s) so that its … -
Replied To a Post in Count for String occurrences
I have absolutely no idea what that code is supposed to do, and I don't suppose many other people will either. Can you explain what it is supposed to do, … -
Replied To a Post in Round-Robin Scheduling using threads, having some trouble
Jamie - this thread is 9 years old and SelArom has not been here in the last 7 years, so don't wait for an answer. -
Replied To a Post in Insert Rows in a Jtable imported from MySql
You need to collect all the data for each row as an array of objects - one element per column, then add that array with `model.addRow(myArrayOfValues);` You can use a …
The End.