Search:

Type: Posts; User: Allicat

Search: Search took 0.20 seconds.

  1. Replies
    7
    Views
    6,080

    Re: Calculator Using AWT

    import java.io.*;
    import java.lang.Math.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Component.*;

    public class Calculator extends Frame implements ActionListener,...
  2. Replies
    7
    Views
    6,080

    Calculator Using AWT

    My code is not working for some reason, help? When I try to compile, it says that there are 34 errors, many stating "illegal start of expression" and "';' expected"


    import java.io.*;
    import...
  3. Replies
    3
    Views
    1,291

    Re: What is Wrong With My Exception Class Code?

    What's the "CreateException class" ?? Mainly it does not read the quotes and says I should have semicolons in places that seem strange to have them in.
  4. Having Difficulties With a Multi Thread Code... Help?

    There is an issue with part of my program, I get two errors.. And I have no idea how to fix it. Here is what I have for the code:


    class Customer{
    private String name;
    private int age;
    public...
  5. Replies
    3
    Views
    1,291

    What is Wrong With My Exception Class Code?

    This is what I have so far:

    class Customer{
    private String name;
    private int age;
    public Customer(String n, int a)throws CreateException{
    if(0<a<125){
    Name=n;
    Age=a;
    throw new...
  6. Replies
    8
    Views
    2,757

    Re: Binary Search Help!

    public class BinarySearch
    {
    public static final int = 45.3;
    public static int binarySearch (Integer [] a, int x)
    {
    int low=0;
    int high = a.length; 45.3;
    int mid;
    ...
  7. Replies
    8
    Views
    2,757

    Re: Binary Search Help!

    What does a. length mean?
  8. Replies
    8
    Views
    2,757

    Re: Binary Search Help!

    public class BinarySearch
    {
    public static final NOT_FOUND = -1;
    public static int binarySearch (Integer [] a, int x)
    {
    int low=0;
    int high = a.length - 1;
    int mid;
    ...
  9. Replies
    8
    Views
    2,757

    Re: Binary Search Help!

    Do I need to write an array to start it, to end it, or not at all? ~ Sorry, I kept getting errors with the code I had.
  10. Replies
    8
    Views
    2,757

    Binary Search Help!

    So I need to do this:

    A Java program to find the value 45.3 from this list ={-3,10,5,24,45.3,10.5} using the binary search method.

    And I have absolutely nothing. I need help as soon as...
  11. Replies
    6
    Views
    4,755

    Re: Single Dimensional Array Help!

    Okay, I re wrote it and now I only have 1 error:

    class SingleDimensionalArray
    {
    public static void main(String args[])
    {
    int a[]= new a[10];
    a[0] = 1;
    a[1] = 2;
    a[2] = 3;
  12. Replies
    6
    Views
    4,755

    Re: Single Dimensional Array Help!

    And when I compile that program it comes up with 4 errors:

    SingleDimensionalArray.java:6: not a statement
    a[]=(1,2,3,4,5,6,7,8,9,19);
    ^
    SingleDimensionalArray.java:6: ';' expected...
  13. Replies
    6
    Views
    4,755

    Re: Single Dimensional Array Help!

    What is an index?
  14. Replies
    6
    Views
    4,755

    Single Dimensional Array Help!

    This is what I'm supposed to do:

    A Java program using single dimensional array. Have a list of 10 numbers and fetch a value based on the index.

    The second part is not very clear, so I ended up...
Results 1 to 14 of 14