Forum: Java 3 Hours Ago |
| Replies: 6 Views: 63 |
Forum: Java 3 Hours Ago |
| Replies: 3 Views: 49 |
Forum: Java 4 Hours Ago |
| Replies: 3 Views: 49 |
Forum: Java 5 Hours Ago |
| Replies: 10 Views: 141 Re: Some questions about arrays Actually this way is a bad idea:
example_array = argument_array;
You don't copy the elements of one array to the other, you say that the 'example_array' is the 'same' as the 'argument_array'.... |
Forum: Java 1 Day Ago |
| Replies: 11 Views: 184 Re: loop statement You need a for-loop inside the while statement. The upper limit of the loop will be the input you give |
Forum: Java 1 Day Ago |
| Replies: 10 Views: 141 |
Forum: Java 1 Day Ago |
| Replies: 2 Views: 91 Re: Difficulty in finding the right algorithm I think this:
double numberOfMonths = (principal + totalInterest) / ( monthly payments)
Should be:
double numberOfMonths = (principal + totalInterest) / ( MonthlyPayments)
And weren't you taught in... |
Forum: Java 1 Day Ago |
| Replies: 1 Views: 83 Re: java printing patterns Change this:
System.out.println( " Please enter number of rows in integer type ");
try {
String MAX_ROWS = stdin.readLine();
} catch (IOException e) {
e.printStackTrace();
} |
Forum: Java 2 Days Ago |
| Replies: 2 Views: 97 |
Forum: Java 3 Days Ago |
| Replies: 5 Views: 160 |
Forum: Java 3 Days Ago |
| Replies: 2 Views: 86 Re: Error massage first of all this:
sides = mSides;
should be like this:
mSides = sides;
And the error you get is because the method:
mRandom.nextInt(mSides)
doesn't take as argument a negative or zero number; as... |
Forum: Java 3 Days Ago |
| Replies: 3 Views: 110 Re: Trouble with classes Java is case sensitive. When you declare an instance like this:
Circle radius = new Circle(),
this would be wrong: Area = Radius.getArea().
This is correct: Area = radius.getArea()
Also you call... |
Forum: Java 3 Days Ago |
| Replies: 2 Views: 142 |
Forum: Java 4 Days Ago |
| Replies: 1 Views: 89 Re: LProp function help What the 3 variables of LProp stand for? If they are the 2 bool values and the which method to call then have an if statement checking what is the 3rd input and call appropriately the reight method... |
Forum: Java 5 Days Ago |
| Replies: 3 Views: 142 Re: coding in java...need help Can you sent a sample of you java code, because I don't understand what you mean when you say:
How different?
Can you provide some code? |
Forum: Java 5 Days Ago |
| Replies: 3 Views: 122 Re: Program Interpolation I assume that the other program (GUI) has a list of classes. Do you know the elements of those classes as well as their methods. If the main GUI page has a constructor you call it with the... |
Forum: JSP 6 Days Ago |
| Replies: 1 Views: 170 Re: Form data What do you mean escape correctly?
Plus you don't display the 'nickname'. That is the name of the element. Like the variable name of a JTextField in swing.
The real value is the 'value' attribute and... |
Forum: Java 6 Days Ago |
| Replies: 3 Views: 122 |
Forum: Java 6 Days Ago |
| Replies: 1 Views: 101 Re: Driver question mport java.util.Scanner;
public class ClockDemo {
public static void main (String[] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter the Current time Hours: ");
int... |
Forum: Java 6 Days Ago |
| Replies: 4 Views: 151 Re: Help with Java constructor BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter value:");
String input = keyboard.readLine();
System.out.println("Value entered:... |
Forum: Java 6 Days Ago |
| Replies: 4 Views: 151 Re: Help with Java constructor Write a Clock class which uses TimeAT class objects to store the current time and an alarm time. The Clock class should have 3 constructors:
- A no-arg constructor
- A constructor which takes one... |
Forum: Java 7 Days Ago |
| Replies: 4 Views: 171 Re: help with Multithread program in JAVA If you have provided with java code, we could help, even if the code was wrong.
But if you have written it in another language, what do expect us to do? Write the entire application just to tell you... |
Forum: JSP 7 Days Ago |
| Replies: 13 Views: 471 Re: help me What is your problem? Getting the data from DB or displaying them? Because displaying them is easy. Just call the setText() method of the JTextFields you have. It you want JTextArea call the append()... |
Forum: Java 9 Days Ago |
| Replies: 29 Views: 540 Re: Array gone awry First of all the assignment is very wrong. The idea is to learn OOP. As other have understood your teacher should have said to create an object Student with the elements required and have an array of... |
Forum: JSP 10 Days Ago |
| Replies: 13 Views: 471 Re: help me Next time be more clear about what is your problem. From what I understood you don't know how to get and use the username from the comboBox?
If yes assume that you have a String username variable.... |
Forum: Java 11 Days Ago |
| Replies: 3 Views: 146 |
Forum: Java 11 Days Ago |
| Replies: 3 Views: 146 Re: How to go back in "main method" Assuming you something like this:
public class Calculator {
public static void main (String args[]) {
String exp = JOptionPane.showInputDialog("Enter mathematical expression: ");
exp =... |
Forum: Java 11 Days Ago |
| Replies: 4 Views: 175 Re: help me I thought that he was trying to understand how the switch statements works. But now that you mentioned it the question looks a lot like a question from a test |
Forum: Java 11 Days Ago |
| Replies: 4 Views: 175 Re: help me int i=0;
switch (i)
{
case 1:
System.out.println("Value 1");
break;
case 2:
System.out.println("Value 2");
break;
} |
Forum: Java 11 Days Ago |
| Replies: 2 Views: 286 |
Forum: Java 12 Days Ago |
| Replies: 4 Views: 194 Re: please implement method Actually adiel224 even forgot to close the bracket :D
This will not compile:
public void update(....){
//complete here
.....
This will: |
Forum: Java 12 Days Ago |
| Replies: 6 Views: 217 |
Forum: Java 12 Days Ago |
| Replies: 6 Views: 217 |
Forum: Java 13 Days Ago |
| Replies: 3 Views: 123 Re: java help The second window will have a conwstructor that will take as argument the first window:
public Frame2 (Frame1 f1)
The Frame1 (first window) will have variables that will take value from the second... |
Forum: Java 14 Days Ago |
| Replies: 3 Views: 225 |
Forum: Java 14 Days Ago |
| Replies: 3 Views: 189 Re: ArrayList looping question First of all static methods are called this way: BankAccount.setName(accountName)
I hope that your methods are not static.
Second with this code, you create 2 new instances, when you need 1. You... |
Forum: Java 14 Days Ago |
| Replies: 3 Views: 189 Re: ArrayList looping question First of all static methods are called this way: BankAccount.setName(accountName)
I hope that your methods are not static.
Second with this code, you create 2 new instances, when you need 1. You... |
Forum: Java 17 Days Ago |
| Replies: 2 Views: 205 Re: NetBeans Menuitem click issue;) Try posting part of the code, and try putting a System.out.println() in the mouseclicked event before you call the function.
Personally I prefer actionEvents for just clicking |
Forum: Java 17 Days Ago |
| Replies: 3 Views: 227 Re: Stack The concept of stack is not unique in java. It applies not only in the programming world but everywhere, so I will explain the basic concept.
When you put items in a stack you place each one of them... |
Forum: Java 17 Days Ago |
| Replies: 7 Views: 231 |