In a folder I only have 2 files. and ArrayQueue.class is the following:

class Main{
public static void main(String args[])
ArrayQueue s = new ArrayQueue()

But it throws an error stating the following:

C:\Users\Jatin\Documents\NetBeansProjects\JavaApplication3\src\ cannot access ArrayQueue
bad class file: C:\Users\Jatin\Documents\NetBeansProjects\JavaApplication3\src\ArrayQueue.class
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ArrayQueue a = new ArrayQueue();
1 error

Please help

try this, make the first line of your code be
public class Main(){

If it doesn't solve it let me know asap. We'ill try something else.

without the '()'. Sorry for the typo

Sorry job done. That is because ArrayQueue has methods present in Java 1.6 and I was running it using Java 1.5.