Each thread could get the time it started by calling the System class's currentTimeMillis() method when it starts and call it later in execution and compute the duration the thread has run by subtracting the start value from the current value . When the user time has run out, the thread would exit.

results[4][5] = i; // problem here nothing gets stored

How do you know? Is the statement executed? It's inside of an if statement.
Add a println immediately after that statement that prints out the value of results[4][5] and the value of i. Then you'll see what was stored in the array.

Look at what is to be printed on each line. The first line has one number, the second line has two number. Each line starts with its line number and decrements. Make some loops that follows those rules.

I think JTextPane is the class to use. I can't find any sample code on my PC. Try Google.

Can you explain how these steps are done? What are the steps the program must do?

1)create another array to compare it against.

What is in this second array and how are its contents put into the array?

2)print out just the single numbers, not the duplicates

How does the program find the single numbers so it can print them?

dont fully understand

That's why you need to work on what steps the program is going to take to solve the problemn BEFORE writing any code for it.

Look at the prinf() method. It has formatting Strings that should help.

Also the String class's format() method could be useful.

Kronolynx commented: thanks +0

Pad the Strings in the first column with spaces so that they are all the same length.
say you want the first column to be 20 characters wide and the String to print is 15 chars long, then you need to add a String of 5 spaces to fill the first column to 20.
Make a method that takes the String and the width of the column and returns a new String with the input String padded with spaces to the width number of characters.

That looks like the normal contents of a browser's java console that is displayed when the browser uses the java plugin. It does not show that there are any problems.

I could find any .java.policy folder

The file's name is .java.policy (its a file not a folder) and is located in the user.home folder. Use the policytool to create it and save it in that folder.
Don't change any of the files in the JDK or JRE's folders.

If you could write code to override permissions, then permissions would be meaningless.

What have you written so far? Do you have any specific questions about your assignment?

jalpesh_007 commented: you're right. +3

What code have you written so far? Do you have any specific problems or questions to ask about it?
Post your code and your questions so we can help you get your code to work.

Try debugging the code by printing the values of the variables used in the draw() method to see where the fillRect() method is drawing.

Please explain what your problem is.
Ask some specific questions about what you are trying to do.

Please only start one thread per topic.

Arabian filly commented: sorry it was by mistake +0

Unsupported major.minor version 51.0

There is a version problem. The java plugin is older than the version of javac used to compile the class file. I think 51 is java 1.7. Look in the browser's java console window to see what version the plugin is.

Why does it look better? As coded, both objects have exactly the same content. That doesn't always make sense. Many times each object will have a different content, one will have the String a and the other the String b. What if you want a variable number of objects, each with its own contents?

confused about the fact that constructor only accepts String a

Look at the definition of the constructor and you can see that it takes just one String as an argument: public ClassObject2(String aStr){

The constructor would look like this if it took 2 Strings:
public ClassObject2(String a1, String a2){

Can you post the full text of the error messages you get.

Can you explain what problems you are having?

Can you add the needed import statements so the code will compile and also post the html needed to execute the applet so the code can be compiled and tested?

int digitValue = ch - 48;    // now the number is really 2

Poorly documented code. Who knows what 48 is.
Better would be:

int digitValue = ch - '0';    // now the number is really 3

Is this the same question: http://www.daniweb.com/software-development/java/threads/436236/sales-receipt-program-from-cash-register-program

Please don't start a new thread for the same question

Lots of people here to help. Can you explain your problem? Post the code you are having problems with and ask any questions you have.

I have not found anything that appears to have a null value regarding line 39 in Main_Class.

Try debugging the code by printing out the values of all the variables used on line 39. The printed values will show what variable is null.

why the upper two lines of code produce error!

Please post the full text of the error message.

One problem is that your class has the same name as a Java SE class. Changing the name of your class should fix those errors.

Can you iterate through the collection, test each object and put it in one of the new lists based on its value?

what is e.f(8,4,2)?

e is a reference to a class object. See E e = new E(5) where e is defined to be an instance of the class E
f is a method in the class referenced by e. See in the E class's definition public int f(int b, int c, int d)
8,4,2 are the three arguments passed to the f method

One way I work out the sequence of steps a program takes is to start at the main() method and number each statement in the order it is executed. A simple start:

    public static void main (String[]args)
        {
        E e = new E(5);                   // 1  
        System.out.println(e.f(8,4,2));
        }//main()

    public E(int z)                       // 2    
        {
        super(z);                         // 3
        }//Constructor

Another way is to add lots of println statements to display the results of all the computations as they are made in each method. This will require the the expressions be broken up into single steps so the results of each step can be printed.

ibthevivin commented: Thanks for the suggestion. It helps. +1

a DynamicArrayOfInts() object. what does that mean?

You create an object of a class with the new statement:
AClass aclsRef = new AClasss();

Here the variable aclsRef refers/points to a AClass object.

You cast a variable to a type by putting the type in ()s before the variable:
int x = (int)aVar; // cast aVar to an int

You can read about casting here: http://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html

how can i pass arguments

Are you passing the args to a class's constructor or to a method in the class?
It is coded the same way:
new ClassName(<the args here>);
aRefToTheClass.aMethodInClass(<the args here>);

See the tutorial: http://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html

jalpesh_007 commented: nice artice... +2

txtOutput.append(temp.format); //I got red line under format why

The compiler can not find the field for the variable: temp
temp is a array of Strings. arrays have few fields. length is the ony one I know of.

What is that code supposed to do?