'get' methods don't usually take an argument unless it's necessary to calculate or select the value to return. They certainly shouldn't take an argument with the same name as a class member variable...
Type: Posts; User: dlorde
'get' methods don't usually take an argument unless it's necessary to calculate or select the value to return. They certainly shouldn't take an argument with the same name as a class member variable...
You need to loop through the string, and each time round the loop, find the character at the position indicated by your loop counter, and if that character is an 'a', increment another counter.
Broadly, it is a named block of code qualified with the keyword 'class'.
It is a named block of code qualified with the keyword 'class'. There's no need for justification, and no particular...
It's hard to say without knowing how you intend to manage the questions and answers data inside your program, but if you have a particular list of questions and maintain a list of answers for the...
You think? How many 'languages of the web' world are you familiar with?
Methinks this character is posting just to advertise the coupon site in his signature...
Looks like you're trying to declare a constructor, but the compiler thinks it should be a method - there's probably some punctuation or syntax problem involved... If you post the relevant code, it...
What do you mean by "load to the question the user was on"?
Just imagine we are strangers on an internet forum who have no idea how your application is going to work, and explain clearly what you...
Before you use a class, you should already know why you want to use it and how to use it to do what you want. If you know why a JFrame fits your requirement, and you know how to use it to achieve...
I suspect the MessageFormat class is as close as you're likely to get.
Hard to tell, since you haven't posted it all.
Where is the code that sets up the user input ?
For what it's worth, the posted code finds and opens a file called 'Test.java' if such a file exists in the current directory. What it does then is anybody's guess. From the look of it, I suspect the...
Are you using NumberFormatter? Are you using the correct NumberFormat for the locale?
If you post the relevant code, perhaps we might be able to make some helpful suggestions.
If you read his code, I think you'll find he knows about System.exit(0) - and uses it. If you read his posts, I think you'll find that has nothing to do with his problem.
You haven't posted your bean code, so does your bean follow the Javabeans Specification? I'd also recommend following the Java Naming Conventions - class names start with uppercase letters, and I'd...
If you're asking how to add an item to an ArrayList, see the ArrayList API docs.
If your ArrayList is going to hold Items, it would be sensible to call it 'items'. If you call it 'Item', how will...
Why can you not just draw a line between the centre-points of the two circles?
There's a reason all the programming gurus feel so strongly about optimization... ;)
Premature optimization is the root of all evil in programming - C.A.R. Hoare
Rules of Optimization:
Rule...
No, it's an OutputStream, so it doesn't read data in. It basically relies on the OS to sort out the details.
I believe (it's a long time since I did any of this stuff) you can also use double-quotes (i.e. nested double quotes), and the system will figure it out, but it makes the code harder to read.
The code you posted does what it says on the tin here - it exits when a key is pressed (it never gets to the key typed handler, because it exits before that).
How can you tell it exits without a...
It's really hard to tell from the scraps you've given us, but it sounds like you want to change the font colour of the table rows depending on the row contents. If so, then your custom table cell...
@Diplo - I think the idea is that we help the OP find a solution himself, rather than spoon-feeding code.
Seems to me that Full-screen Exclusive Mode would be ideally suited to screensavers.
Have you tried enclosing 'yes' in single quotes?
The OP probably wants to find the last index of the comma... ;)