473,412 Members | 4,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

class or interface expected

I am writing a java program on putty

i have my p.java class as follows

/** comments

*/
public enum p{yes,no};

and this tells me i need a class or an interface and im so confused as to what is happening?
When i compile of putty with javac *.java it comes up with errors.

Could it be that its not the latest java compiler? If so i have a makefile so how do i add it to it?

Please help me with this, i have been trying this the entire night.
Mar 29 '12 #1
3 2979
What are you trying to accomplish? You need to figure that out before you try compiling a program. I can't really help after that as I don't know Java, but I know C++ and your piece of code looks like it accomplishes nothing.
Mar 29 '12 #2
r035198x
13,262 8TB
If you want to make it public then it must be in it's own file that matches the name of the enum. Also, you should be using Java 5 or newer for you to be able to use enums.
Mar 29 '12 #3
can you share your code here...!
Mar 29 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: ChrisB | last post by:
Hello: I am writing an application using C# that needs to support several queries that limit the number of returned records through the use of filtering and was hoping to get some opinions on...
5
by: owais | last post by:
Hi, I have a problem, I want to implements Parent class interface methods in child class. for e.g -------------- Test1.vb ---------------- Imports System Imports System.Web.UI Imports...
2
by: fujiyama | last post by:
Hi, I have a problem with reuse of the same class interface. I have two user controls which uses the same IAppElement interface. When I use both controls I recieve warning message warning CS0436 -...
2
by: Kevin Frey | last post by:
In a derived class I am trying to redefine the implementation of a interface method defined in a base class - the base class interface method was not declared virtual. I have yet to actually...
0
by: Ignacio Machin \( .NET/ C# MVP \) | last post by:
I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363): 'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected" on the following code: private void...
10
Dököll
by: Dököll | last post by:
I don't want you nice guys to waste your too much of your time, and confused me in the process. I am hoping you can explain it to me like I am 2 years old, that's it. Hoping to get a handle...
2
by: audiokarate | last post by:
I have like atleast 15 errors that say class, interface, or enum expected and I have no idea what that means. Can someone tell me what it is and how I might be able to fix it? Thank you. - Manny...
5
by: Jeremy | last post by:
I've got two projects, both reference system, system.data and system.xml and both include the using System.Xml.Serialization and using System at the top of the file. Both also include the...
0
by: kirthi kumari | last post by:
i donot find any errors,but for almost 18lines of the code am getting an error saying "class,interface or enum expected error".please look at the code below package NQ; import...
2
by: ngeywa | last post by:
I am new in java and need your assistance. i have the code below which keep throwing error "class or interface expected". public class Candidates { String candidateName; String...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.