Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2008, 06:28 PM
Member
 
Join Date: May 2008
Posts: 3
Sniper-X is on a distinguished road
System.out.println
i am designing a program using Blue J and for some reason i cant use System.out.println. It says it cant find the variable out, can someone PLEASE HELP!!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-04-2008, 06:35 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 250
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
how did you use the System.out.println?

If you made like System.out.println(out);
Be sure you have the out variable.

If you just want to print a word "out",

System.out.println("out");

Or, show us your code including the stackTrace( the error )
__________________
best regards,
sukatoa
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-04-2008, 07:06 PM
Member
 
Join Date: May 2008
Posts: 3
Sniper-X is on a distinguished road
this is the code i used
/**
* Add applicants to the system.
*/
public void addApplicant (Person newPerson)
{
if(persons.size() == capacity) {
System.out.println("All advisors are busy, please come back later." );
}
else {
persons.add(newPerson);
}
}

This is the code i used and it doesnt work can u help
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-04-2008, 07:17 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 250
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
This kind of error is new to me....

Just to confirm, can you show the whole error (StackTrace)?

I think printing to console is not the problem,
Just to confirm
__________________
best regards,
sukatoa
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-04-2008, 08:34 PM
Member
 
Join Date: May 2008
Posts: 3
Sniper-X is on a distinguished road
Heres the whole problem
import java.util.*;
import java.lang.String.*;


/**
* The System basically put's the information of all the people looking for work
* and all their details are on the system.
*
* @Author RioAntonio Drayton
* @Version 2008.04.04
*/

public class System
{
private String advisor;
private String desk;
private String timeAndDay;
private List <Person> persons;
private int capacity;

/**
* This creates a new system with the number of applicants. Some details
* are set to unknown.
*/

public System (int numberOfApplicants)
{
advisor = "unknown";
desk = "unknown";
timeAndDay = "unknown";
persons = new ArrayList<Person>();
capacity = numberOfApplicants;
}



/**
* Add applicants to the system.
*/
public void addApplicant (Person newPerson)
{
if(persons.size() == capacity) {
System.out.println("All advisors are busy, please come back later." );
}
else {
persons.add(newPerson);
}
}

/**
* Return the number of apllicants thats registered details.
*/
public int numberOfApplicants()
{
return persons.size();
}

}
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 05-04-2008, 09:26 PM
danielstoner's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 117
danielstoner is on a distinguished road
Please post the exact error message and tell us more about what you do. Are you writing an applet? Then you don't actually have an "out".
__________________
Daniel @ [www.littletutorials.com]
Language is froth on the surface of thought
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 05-04-2008, 10:20 PM
Zosden's Avatar
Senior Member
 
Join Date: Apr 2008
Posts: 218
Zosden is on a distinguished road
Its either something like daniel said or you didn't install java correctly.
__________________
Definition of Impossible = making a good game in Java.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 05-05-2008, 12:54 PM
rjuyal's Avatar
Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 92
rjuyal is on a distinguished road
Blue J
have u configured your Blue J correctly?
__________________
Life was much better in 2021
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 05-05-2008, 03:10 PM
Member
 
Join Date: May 2008
Posts: 11
Jesdisciple is on a distinguished road
It's trying to use his System class. He needs to use java.lang.System.out.println().
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 05-05-2008, 03:52 PM
danielstoner's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 117
danielstoner is on a distinguished road
LOL, this was funny, I didn't notice the name collision hahaha. Good catch Jesdisciple. This only proves again one should look at the problem before giving advice... and also start with the simple things first
__________________
Daniel @ [www.littletutorials.com]
Language is froth on the surface of thought
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 05-05-2008, 04:41 PM
Member
 
Join Date: May 2008
Posts: 11
Jesdisciple is on a distinguished road
Yup, that's like the programmer's lifelong struggle: Make sure it's plugged up first. (BTW, I've been getting a kick out of this, too.)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.out.println sunjavaboy Advanced Java 3 03-22-2008 02:30 AM
Template for System.out.println eva Eclipse 3 01-05-2008 01:46 PM
Why does System.out.println do not need import java.io? bozovilla New To Java 2 11-24-2007 07:25 AM
System.out.println shortcut ravian Eclipse 2 11-07-2007 11:17 AM
Help me with system.out.println baltimore New To Java 1 07-31-2007 09:30 PM


All times are GMT +3. The time now is 09:40 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org