Results 1 to 2 of 2
- 01-28-2013, 06:04 AM #1
Member
- Join Date
- Jan 2013
- Posts
- 1
- Rep Power
- 0
how to instantiate a ConsoleProgram in java
I want to use the method "println" in ConsoleProgram to print a sentence.
I was trying to instantiate ConsoleProgram , program and use the object program to call this method.
Did I do the write thing? it doesn't work and I don't know why. THank you!
import acm.program.*;
public class printex {
public void run(){
ConsoleProgram program = new ConsoleProgram();
program.println("This program lists the Fibonacci sequence");
int Fib0=0;
int Fib1=1;}
}
- 01-28-2013, 10:32 AM #2
Re: how to instantiate a ConsoleProgram in java
I don't even know where to start. Have a look at these tutorials: Trail: Getting Started (The Java™ Tutorials)
Complete list: The Java™ TutorialsMath problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Similar Threads
-
Cannot instantiate the type
By JavaNovice1 in forum New To JavaReplies: 1Last Post: 11-01-2011, 03:25 PM -
Cannot instantiate a type
By Yeshol in forum EclipseReplies: 14Last Post: 07-06-2011, 05:03 PM -
Error: ConsoleProgram cannot be resolved to the type
By petrohamadi in forum New To JavaReplies: 5Last Post: 06-13-2011, 10:49 PM -
help instantiate a java class that extend applet
By geosa in forum Java AppletsReplies: 0Last Post: 12-04-2010, 09:14 AM -
How to instantiate Class, into jsp, java script
By silvia in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 08-07-2007, 05:45 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks