473,406 Members | 2,847 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,406 software developers and data experts.

trying to get started

What could be wrong in this file?



class Motorcycle {
String make;
String color;
boolean startengine;
public static void main (String args[]) {
Motorcycle m=new Motorcycle ();
m.make = "Yamaha RZ350";
m.color = "yellow";
System.out.println("Calling showAtts...");
m.ShowAtts ();
System.out.println("覧覧");
System.out.println("Starting engine...");
m.StartEngine ();
System.out.println("覧覧");
System.out.println("Calling showAtts...");
m.ShowAtts ();
System.out.println("覧覧");
System.out.println("Starting engine...");
m.StartEngine ();
}
}



When I try to compile it gives these errors:


Motorcycle.java:10: cannot find symbol
symbol : method ShowAtts ()
location: class Motorcycle
m.ShowAtts ();
^
Motorcycle.java:13: cannot find symbol
symbol : method StartEngine ()
location: class Motorcycle
m.StartEngine ();
^
Motorcycle.java:16: canoot find symbol
symbol : method ShowAtts ()
location: class Motorcycle
m.ShowAtts ();
^
Motorcycle.java:19: cannot find symbol
symbol : method StartEngine ()
location: class Motorcycle
m.StartEngine ();
^
4 errors


I致e tried to finding mistakes but didn稚 find please help
Mar 13 '07 #1
3 1388
r035198x
13,262 8TB
What could be wrong in this file?



class Motorcycle {
String make;
String color;
boolean startengine;
public static void main (String args[]) {
Motorcycle m=new Motorcycle ();
m.make = "Yamaha RZ350";
m.color = "yellow";
System.out.println("Calling showAtts...");
m.ShowAtts ();
System.out.println("覧覧");
System.out.println("Starting engine...");
m.StartEngine ();
System.out.println("覧覧");
System.out.println("Calling showAtts...");
m.ShowAtts ();
System.out.println("覧覧");
System.out.println("Starting engine...");
m.StartEngine ();
}
}



When I try to compile it gives these errors:


Motorcycle.java:10: cannot find symbol
symbol : method ShowAtts ()
location: class Motorcycle
m.ShowAtts ();
^
Motorcycle.java:13: cannot find symbol
symbol : method StartEngine ()
location: class Motorcycle
m.StartEngine ();
^
Motorcycle.java:16: canoot find symbol
symbol : method ShowAtts ()
location: class Motorcycle
m.ShowAtts ();
^
Motorcycle.java:19: cannot find symbol
symbol : method StartEngine ()
location: class Motorcycle
m.StartEngine ();
^
4 errors


I致e tried to finding mistakes but didn稚 find please help
70% of the time, the compiler message actually tells you the problem and gives you an idea of how to fix the problem.
In this case you are calling methods that do not exist.


P.S Next time when posting code, please use code tags.
Mar 13 '07 #2
Hi...
m.ShowAtts ();

m.StartEngine ();

Here it's giving the error? have u defined these 2 functions?

have u posted the full java code? i don't see these functions defined in the code..

that may b d reason...

Hope this helps...
Thanx and regards...
sand...
Mar 13 '07 #3
Thanks a lot.
Mar 18 '07 #4

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

Similar topics

1
by: Larry | last post by:
I am a C++/Java programmer trying to get going with some simpe xml transformations at work here. I bought the O'Reilly book Learning xlst for kicks. Someone at work sent me this xml shown below,...
4
by: Luc | last post by:
Hi all, I have to debug an exe with the VS studio .NET environment. but first my exe has to be started using another exe. So I arranged my project properties to start this first exe. Doing so,...
8
by: Rich Grise | last post by:
I think I've finally found a tutorial that can get me started: http://www.zib.de/Visual/people/mueller/Course/Tutorial/tutorial.html and I've been lurking for awhile as well. What happened is,...
12
by: Will Ferrer | last post by:
I am looking to get started using PHP and I am looking for a nice GUI to use. Basically I have been programing in Macromedia Director, and Macromedia Flash for years now, and I have gotten spoiled...
10
by: Tom | last post by:
Hello, I've recently started trying to learn C (for the fun of it!). I have been using Perl and other languages for many years, but they were always very high level, this is giving me quite a...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
12
by: Jim Anderson | last post by:
This is my first attempt at XML documentation. I'm trying to get started with docbook so I can put a set of documentation into docbook tags. I'm using 'XML In A Nutshell" and "DocBook The...
1
by: Will Parsons | last post by:
I am trying to get started with using Docbook/xml using free tools and am stymied in generating printable documentation from even the simplest source. I have attempted to generate a PDF using...
2
by: lifeshortlivitup | last post by:
I am a java beginner and am trying to tackle a temperature conversion problem but I don't exactly know how to begin. The problem asks that I write a program that allows the user to conver either...
0
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project用lanning, coding, testing,...
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...

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.