after some munipulation I have an error on line 33 that states array diminsion missing
line 33 print(list, length.getNum(1 2));
Any clues
User Profile
Collapse
-
This is the code that I came up with using what I got out of the instruction. It will not compile and honestly I have tried to change it every which way I can. I have looked at all your responses and have tried to impliment them into the program with no success. I just can't get it to compile
import java.io.*;
import java.util.*;
public class Assignment5
{
static BufferedReader...Leave a comment:
-
okay, so far I am with you. he also put in here that I can assume that the array is unsorted. which I am assuming is that the integers are not in recognizable order and that they are random. So I guess that what needs to be created first is the three parameters, is that correct?Leave a comment:
-
Tough assignment
I have to write a method , RemoveAll that takes three parameters: an array of integers the length of an array and an integer. Say RemoveItem. The method should find and delete all occurences of removeItem in the array.
I have told the instructor that I am not sure exactly what he wants me to do and I have looked at all the instances of removeItems in the script and still I am clueless.
Can someone explain what I should... -
-
Applet question
this is an applet for a white board with an append button on it, when you press it what ever you have typed in one box should show up in the second box, but it doesn't. Have the program doing everything but that.
import javax.swing.*;
import java.awt.*;
import java.awt.event. *;
public class WhiteBoard extends JApplet //start of applet
{
private static int WIDTH = 550;
... -
On the actual code that I have on my system it is all indented, but when I copied it over this is what happened. Again thanks for your help.Leave a comment:
-
Final code:
...Code:/** * Description: This takes the original calculator program that could be used * on integers and converts it to be able to use decimal numbers. Division by * zero creates error resulting in ERROR: / by zero. */ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; public class Calculator extends JFrame implements
Leave a comment:
-
I would like to thank everyone for thier input and let you know that I have resolved all issues with this project. New one to come soon. Expect to hear more from me. Thanks again.Leave a comment:
-
private String evaluate()
{
final char beep = '\u0007';
try
{
double num1 = Double.parseDou ble(numStr1);
double num2 = Double.parseDou ble(numStr2);
double result = 0;
switch (op)
{
case '+': result = num1 + num2;
break;
...Leave a comment:
-
Okay, I put the statement were thought it should go but it still comes up infinity, any other hints clues suggestions? Or am I just an idiot? See below
import javax.swing.*;
import java.awt.*;
import java.awt.event. *;
import java.io.*;
public class Calculator extends JFrame implements ActionListener {
private JTextField displayText = new JTextField(30);
private JButton[]...Leave a comment:
-
Now I'm really confused as to were I would insert the Dividing by (int) 0 or were I would put the throw exception to make this happen? I have tried install it in several places in the code and all I get is error after error. I'm really lost here!...Leave a comment:
-
further problem now I am getting infinity if I divide by zero. The exception should have caught it and given it an error : / by zero. Now, what have I forgotten?Leave a comment:
-
I cant believe that it was something that I overlooked. A special thanks to r035198x, for not only looking over the code, but for helping me out.Leave a comment:
-
Calculator without a decimal point
This was originally just a calculator without a decimal point. After I added the decimal, it now tells me invalid second number.
...Code://GUI Calculator Program import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; public class Calculator extends JFrame implements ActionListener { private JTextField displayText = new JTextField(30); -
-
Either, The over all outcome should be that the lowercase letter covert to upper case....Leave a comment:
-
-
Gui problem
Okay I thought I had this figured out....it gives the gui...but then on the coversion to capitol letters it gives me all kinds of exceptions
import javax.swing.JOp tionPane; //GUI support
public class UpperCase
{
public static void main(String[] args)
{
String s;
s = JOptionPane.sho wInputDialog("E nter any characters:");
... -
I took it out and java still hangs up. the program just keeps running. Is there something else to look at?...Leave a comment:
No activity results to display
Show More
Leave a comment: