Why use a loop? You are attempting to do a single thing (display the month) not trying to do something 12 times. Try a single System.out.printf() statement to print the thing you want.
(By the...
Type: Posts; User: pbrockway2
Why use a loop? You are attempting to do a single thing (display the month) not trying to do something 12 times. Try a single System.out.printf() statement to print the thing you want.
(By the...
The OP posted a request for someone to do his or her homework and got no takers. That was over 2 months ago and they haven't been heard from since. Closing the thread.
In both cases there are two '^' operators in the numerator (top) of the fraction, so I would expect two uses of Math.pow in each numerator. But you only have one.
Break the expressions up into...
It's quite possible I'm missing something, but "Team 1 plays t2", then later "Team 3 plays t1...". Isn't team 1 overbooked? Surely what matters is who plays whom in what round.
Coming up with a...
Did you check the ActionListener documentation? And, if so, were you able to locate the full name of ActionEvent class (including the package of which it's part)?
The error message I see when I attempt to compile your code is
FrameAndButton.java:10: error: FrameAndButton is not abstract and does not override abstract method actionPerformed(ActionEvent)...
Fair enough. But what happens if you insert the missing ')' just before the end of the statement? Note that the statement ends with the very final ';' character.
I'm sorry about the misunderstanding: what I meant to suggest is that it is us (the people who are reading your post) who tend to be lazy. When you indicate which line is 118 or whatever, people...
Minor point: I didn't think Eclipse offer a JDK. At least that what I take from the Eclipsepedia Installation page. With Eclipse I have always used Oracle's (for no particular reason).
JetBrains...
At the end of the code you posted you have
car.setOnKeyPressed(e ->
{
switch ( e.getCode())
{
case UP:
The problem with a map like this is that the same value can be repeated as a value in the array, but not as the key of a map.
Attempting to find the original index positions *after* the sort has...
In case you haven't seen it, check out Oracle's Packaging Programs in JAR Files tutorial. The links "Working with Manifest Files: The Basics" -> "Adding Classes to the JAR File's Classpath" are also...
Hi airgmbop, welcome to the forums.
It can be very difficult (for you and for us!) to diagnose a problem when confronted with a mountain of code.
The tried and true way of dealing with this is to construct a small simple example of...
Hi wei, and welcome!
Please don't hijack other threads. Discussion for this is better at http://www.javaprogrammingforums.com/whats-wrong-my-code/40899-java-code-math-problem-find-missing-paranthesis.html
Similar...
One step at a time!
public class Question
{
// Constant for the number of questions
public final int NUM_ANSWERS = 10;
// The trivia question
Try posting the text of any error message you are asking about. And say what you that results in the message being displayed.
It would be better if you attempted writing this class yourself.
Post what you come up with, including any compiler messages that you can't understand.
Hi rehankhan36, welcome to the forums!
Hi SoutheyJ, and welcome!
Warning: software I write is for my own usage, but these are my thoughts...
JavaDB stores data in a folder that is referenced as a url by your program. It is quite distinct from the .jar file...
@planetHollywood
The question asked was about objects where each object's behaviour might depend on the state of the other objects. And the OP asked whether it was better to pass the other...
I'm sorry, but I don't really see how "Generics" is an answer to the question the OP asked: "Can anybody tell me (and where) should i put on the mode button to set the mode variable?"
In fact,...
old thread closed