The Artima Developer Community
Sponsored Link

Java Answers Forum
Help me with blue j please

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
akshai dattani

Posts: 1
Nickname: akshai
Registered: Jan, 2007

Help me with blue j please Posted: Jan 8, 2007 11:42 PM
Reply to this message Reply
Advertisement
Hey people i have just started using blue j i have to create a fortune teller box basically when i add in a number of 1 - 10 it must come up with diffrent fortunes..i know you have to create a class first but i do not know what codding to write when i double click it all that comes up is this:


/**
* Write a description of class FortuneTeller here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class FortuneTeller
{
// instance variables - replace the example below with your own
private int x;

/**
* Constructor for objects of class FortuneTeller
*/
public FortuneTeller()
{
// initialise instance variables
x = 0;
}

/**
* An example of a method - replace this comment with your own
*
* @param y a sample parameter for a method
* @return the sum of x and y
*/
public int sampleMethod(int y)
{fortuneTeller {
public static void main(String[] args) {
System.out.println("Welcome to the Fortune Teller"); // Display the string.
}
}

// put your code here
return x + y;
}
}



Can you guys help me out?

Topic: Help me with blue j please Previous Topic   Next Topic Topic: how to add a JPassword field in a JTable

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use