Tuition.java tutorial program help

I am working on a tutorial program Tuition.java from the Shelly Cashman series Java Programming book. I completed the below code according to instructions, but keep getting these compile errors.
Can anyone tell me where I'm going wrong?
Compile errors:
C:\Documents and Settings\Jay\My Documents\Jays School Papers\CISB 331 Java\Project 3\Tuition.java:94: cannot find symbol
symbol : variable tuition
location: class Tuition
total = tuition + fees;
^
C:\Documents and Settings\Jay\My Documents\Jays School Papers\CISB 331 Java\Project 3\Tuition.java:94: cannot find symbol
symbol : variable fees
location: class Tuition
total = tuition + fees;
^
C:\Documents and Settings\Jay\My Documents\Jays School Papers\CISB 331 Java\Project 3\Tuition.java:94: incompatible types
found : java.lang.String
required: double
total = tuition + fees;
^
3 errors
Tool completed with exit code 1
import java.io.*;
import java.text.DecimalFormat;
public class Tuition
public static void main(String[] args)
//Declare variables
int hours;
double fees, rate, tuition;
displayWelcome();
hours = getHours();
rate = getRate(hours);
tuition = calcTuition(hours, rate);
fees = calcFees(tuition);
displayTotal(tuition + fees);
// start the welcome() method
public static void displayWelcome()
System.out.println("Welcome to the Tuition Calculator program");
System.out.println();
//getHours() will receive the input from the user and use a Try and Catch statement for validation.
public static int getHours()
String strHours;
int hours = 0;
boolean done = false;
BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
while(!done) //Keep asking for integer input while input is in incorrect format.
//get hours from user.
System.out.println("Please enter your total credit hours: ");
strHours = dataIn.readLine();
//Validate input using Try
try
hours = Integer.parseInt(strHours);
done = true;
catch (NumberFormatException e) //Catch error and display response
System.out.println("Your entry was not in the correct format.");
public static double getRate(int hours) //Set hours rate based on amount of hours.
//declare variables
double rate;
if(hours > 15)
rate = hours * 44.50;
else
rate = hours * 50.00;
return rate;
public static double calcTuition(int hours, double rate) //Caclulate tuition and return it.
//declare variables
double tuition;
tuition = hours * rate;
return tuition;
public static double calcFees(double tuition) //Calculate total fees.
//declare variables
double fees;
fees = tuition * .08;
return fees;
public static void displayTotal(double total) //Calculate entire tuition costs and display.
//declare variables
//double total;
total = tuition + fees;
DecimalFormat twoDigits = new DecimalFormat("$#000.00");
System.out.println("Your Tuition is " + total);
Thanks!!

Thanks, I commented out the "total = tuition + fees;
But now I get these compile errors
C:\Documents and Settings\user\Tuition.java:61: missing return statement
^
C:\Documents and Settings\user\Tuition.java:48: unreported exception java.io.IOException; must be caught or declared to be thrown
               strHours = dataIn.readLine();
^
2 errors
Tool completed with exit code 1
Here is the updated code:
{code}import java.io.*;
import java.text.DecimalFormat;
public class Tuition
     public static void main(String[] args)
          //Declare variables
          int hours;
          double fees, rate, tuition;
          displayWelcome();
          hours = getHours();
          rate = getRate(hours);
          tuition = calcTuition(hours, rate);
          fees = calcFees(tuition);
          displayTotal(tuition + fees);
     // start the welcome() method
     public static void displayWelcome()
          System.out.println("Welcome to the Tuition Calculator program");
          System.out.println();
     //getHours() will receive the input from the user and use a Try and Catch statement for validation.
     public static int getHours()
          String strHours;
          int hours = 0;
          boolean done = false;
          BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
          while(!done) //Keep asking for integer input while input is in incorrect format.
               //get hours from user.
               System.out.println("Please enter your total credit hours: ");
               strHours = dataIn.readLine();
               //Validate input using Try
               try
                    hours = Integer.parseInt(strHours);
                    done = true;
               catch (NumberFormatException e) //Catch error and display response
                    System.out.println("Your entry was not in the correct format.");
     public static double getRate(int hours) //Set hours rate based on amount of hours.
          //declare variables
          double rate;
          if(hours > 15)
               rate = hours * 44.50;
          else
               rate = hours * 50.00;
          return rate;
     public static double calcTuition(int hours, double rate) //Caclulate tuition and return it.
          //declare variables
          double tuition;
          tuition = hours * rate;
          return tuition;
     public static double calcFees(double tuition) //Calculate total fees.
          //declare variables
          double fees;
          fees = tuition * .08;
          return fees;
     public static void displayTotal(double total) //Calculate entire tuition costs and display.
          //declare variables
          //double total;
          //total = tuition + fees;
          DecimalFormat twoDigits = new DecimalFormat("$#000.00");
          System.out.println("Your Tuition is " + total);
{code}

Similar Messages

  • Desperately need Java network programming help!!!

    I need to make a Distributed File Sharing System (DFSS) using java language. The system should not make use of the central file server. The system should coordinate the concurrent access of files over the distributed environment. Caching may be used to enhance the system performance.
    It is basically network programming.
    Does any one have any idea how to make the DFSS. If you do please help!!!
    thank you in advance for you help
    cheers

    well, you're getting somewhere I guess. My original answer was intentionally vague because your original question was so vague. These fora are no good for asking questions like "how do I implement a distributed file system", they are good for asking things like "the following line(s) of code generate the following condition I didn't expect, rather I expected this condition, could someone tell me what is going on?" or something of similar specificity.
    So you are now asking how to, for instance, check to see if a text file is being shared. This is still too vague, but it's better than "how do I write a file sharing system". If you are feeling particularly industrious, go look at a project JXTA at http://www.jxta.org/ - it's open source, you can look at the code. Of course, if you're brand new, this might not help. In fact, not to discourage you, but if you're that new, this is not the project to be doing.
    Good Luck
    Lee

  • New to Java Wireless Programming - Help needed!

    I'm currently finishing my 4 java programmign class in university, and i'm not looking to expand my knowledge in the this language. I would like to learn the how to code for wireless devices. I've already downloaded the Java Wireless Toolkit, but I would really appreciate some direction on what I should read to know where to start with this. Any info that anyone may have is greatly appreciated!
    Thanks
    Al

    Googling J2ME tutorials or MIDP tutorials will give you plenty to read.
    but here's a start:
    http://www.developer.com/java/j2me/article.php/10934_1561591_1
    http://developers.sun.com/techtopics/mobility/midp/samples/index.html#getstart

  • Executing HelloWorld program in EJB java.lang.NoClassDefFoundError-help plz

    Hi
    I am a tyro to Weblogic 8.1 server with EJB. I am Running a simple HeloWorld program ,but it throws No class def found err. Below i listed my program.help needed.
    Home interface
    package examples;
    import java.rmi.*;
    import javax.ejb.*;
    public interface HelloWorldHome extends EJBHome {
    public HelloWorld create() throws CreateException,RemoteException;
    Remote interface:
    package examples;
    import java.rmi.*;
    import javax.ejb.*;
    public interface HelloWorld extends EJBObject
    public String getHelloWorldMsg () throws RemoteException;
    HelloWorldLocal-- Remote
    package examples;
    import javax.ejb.*;
    public interface HelloWorldLocal extends EJBLocalObject
    public String getHelloWorldMsg();
    HelloWorldLocalHome:
    package examples;
    import javax.ejb.*;
    public interface HelloWorldLocalHome extends EJBLocalHome
    HelloWorldLocal create() throws CreateException;
    HelloWorldBean:
    package examples;
    import javax.ejb.*;
    import javax.SessionContext;
    public class HelloWorldBean implements SessionBean
    public HelloWorldBean() {}
    private void log(String s) {
    if (true) System.out.println(s);
    public void ejbActivate() {}
    public void ejbPassivate() {}
    public void ejbRemove() {
    log("ejbRemove() called");
    public void setSessionContext(SessionContext ctx) {
    log("setSessionContext called");
    this.ctx = ctx;
    public void ejbCreate() throws CreateException {
    log("ejbCreate() called");
    public String getHelloWorldMsg () {
    log("Bean Method called");
    return ("Stateless SessionBean says Hello World");
    Client program
    package examples;
    import java.rmi.*;
    import javax.rmi.PortableRemoteObject;
    import javax.naming.*;
    import java.util.*;
    import examples.HelloWorldHome;
    import examples.HelloWorld;
    * This class is an example of client code that calls
    * methods on a simple stateless session bean.
    public class HelloWorldClient {
    private static Context createJNDIContext()
    throws NamingException, RemoteException {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,"t3://localhost:7001");
    Context context = new InitialContext( env );
    return context;
    * Main method to unit test the HelloWorld API
    public static void main(String[] args) {
    try
    // use JNDI to look up the home interface for HelloWorld
    Context context = createJNDIContext();
    // You could use the following statement to retrieve
    // the HelloWorld home
    /* HelloWorldHome home =
    (HelloWorldHome)
    context.lookup("examples.HelloWorldHome"); */
    // However, using javax.rmi.PortableRemoteObject
    // allows you to narrow the scope
    // to the home interface
    HelloWorldHome home = (HelloWorldHome )
    PortableRemoteObject.narrow(
    context.lookup("examples.HelloWorldHome"),
    examples.HelloWorldHome.class ) ;
    HelloWorld hello = home.create();
    * The EJBObject will delegate the call to the HelloWorld
    * session bean, receive the result, and return it to this client.
    System.out.println(hello.hello());
    * Remove the EJBObject.
    * The container will mark the EJBObject for destruction.
    hello.remove();
    catch( Exception err )
    System.err.println( err.toString() );
    and also i put Class path in sys variables.I don't know reason y not running .help needed.
    bye

    Client program , No class def found exception.Create an ejb-client.jar containing only the home and remote interfaces for the EJB and add them to the classpath while executing the client code. You could also copy the EJB JAR for that.

  • Java Programming Help

    I'm new to Java programming, and I have a pretty basic question. I'm writing a simple loan calculator, and I need to know how to format the output of my variables to two decimal places. I've been doing this for about a week, so be nice, please.
    Thanks in advance,
    Wayne

    NumberFormat nf = NumberFormat.getCurrencyInstance();
    double cash = 123.45;
    System.out.println(nf.format(cash));
    Your First Cup of Java
    Essentials, Part 1, Lesson 1: Compiling & Running a Simple Program
    The Java Tutorial - A practical guide for programmers
    New to Java Center
    How To Think Like A Computer Scientist
    Introduction to Computer Science using Java
    The Java Developers Almanac 1.4
    JavaRanch: a friendly place for Java greenhorns
    jGuru
    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP
    Books:
    Bert Bates and Kathy Sierra's Head First Java
    Bruce Eckel's Thinking in Java (Free online)
    Joshua Bloch's Effective Java
    Java Design: Building Better Apps and Applets (2nd Edition)

  • �� I have a java applet program (yanhua.java) need help!!!

    �� I have a java applet program (yanhua.java) that use mouse click a area show a fireworks, the applet program that a java fan mail me. Now i find some bug in the program, can you help me? thank in advance!
    The backdrop of the question: The yanhua.java applet program works well. But one day, i install j2re 1.4.1 plugin for my microsfot Internet Explorer, i run the yanhua.java applet program again, it show difficult(i move my mouse in the area, slowness), the fireworks is not fluent. Then i try my best to find the cause , i get some information, the following: yanhua.java run in j2re 1.4.1 plugin,it will deplete 100% cpu; else yanhua.java does not run in j2re 1.4.1 plugin, it will deplete 90%--95% cpu too; but my computer c3 1G cpu and 256MB memory, without running other program at that time. So i can have the assurance to say that the yanhua.java have some bug or error. can you help me to find all bug in yanhua.java? thank you very much!!!
    i want to solve the question: finding all bug in yanhua.java
    NOTE:
    1��fireworks show specially good effect(a yanhua.java applet) you can look at:
    http://www.3ren.net/down/java/yanhua.html
    2��all program you can get from http://www.3ren.net/down/java/yanhua.rar
    /*************************yanhua.java******************************
    import java.applet.Applet;
    import java.applet.AudioClip;
    import java.awt.*;
    import java.awt.image.MemoryImageSource;
    import java.util.Random;
    public class yanhua extends Applet
    implements Runnable
    private int m_nAppX;
    private int m_nAppY;
    private int m_centerX;
    private int m_centerY;
    private int m_mouseX;
    private int m_mouseY;
    private int m_sleepTime;
    private boolean isError;
    private boolean m_isPaintFinished;
    boolean isRunning;
    boolean isInitialized;
    Thread runner;
    int pix0[];
    MemoryImageSource offImage;
    Image dbImg;
    int pixls;
    int pixls2;
    Random rand;
    int bits;
    double bit_px[];
    double bit_py[];
    double bit_vx[];
    double bit_vy[];
    int bit_sx[];
    int bit_sy[];
    int bit_l[];
    int bit_f[];
    int bit_p[];
    int bit_c[];
    int bit_max;
    int bit_sound;
    int ru;
    int rv;
    AudioClip sound1;
    AudioClip sound2;
    public yanhua()
    m_mouseX = 0;
    m_mouseY = 0;
    m_sleepTime = 5;
    isError = false;
    isInitialized = false;
    rand = new Random();
    bits = 10000;
    bit_px = new double[bits];
    bit_py = new double[bits];
    bit_vx = new double[bits];
    bit_vy = new double[bits];
    bit_sx = new int[bits];
    bit_sy = new int[bits];
    bit_l = new int[bits];
    bit_f = new int[bits];
    bit_p = new int[bits];
    bit_c = new int[bits];
    ru = 50;
    rv = 50;
    public void init()
    String s = getParameter("para_bits");
    if(s != null)
    bits = Integer.parseInt(s);
    s = getParameter("para_max");
    if(s != null)
    bit_max = Integer.parseInt(s);
    s = getParameter("para_blendx");
    if(s != null)
    ru = Integer.parseInt(s);
    s = getParameter("para_blendy");
    if(s != null)
    rv = Integer.parseInt(s);
    s = getParameter("para_sound");
    if(s != null)
    bit_sound = Integer.parseInt(s);
    m_nAppX = this.getSize().width;
    m_nAppY = this.getSize().height;
    m_centerX = m_nAppX / 2;
    m_centerY = m_nAppY / 2;
    m_mouseX = m_centerX;
    m_mouseY = m_centerY;
    resize(m_nAppX, m_nAppY);
    pixls = m_nAppX * m_nAppY;
    pixls2 = pixls - m_nAppX * 2;
    pix0 = new int[pixls];
    offImage = new MemoryImageSource(m_nAppX, m_nAppY, pix0, 0, m_nAppX);
    offImage.setAnimated(true);
    dbImg = createImage(offImage);
    for(int i = 0; i < pixls; i++)
    pix0[i] = 0xff000000;
    sound1 = getAudioClip(getDocumentBase(), "firework.au");
    sound2 = getAudioClip(getDocumentBase(), "syu.au");
    for(int j = 0; j < bits; j++)
    bit_f[j] = 0;
    isInitialized = true;
    start();
    public void run()
    while(!isInitialized)
    try
    Thread.sleep(200L);
    catch(InterruptedException interruptedexception) { }
    do
    for(int j = 0; j < pixls2; j++)
    int k = pix0[j];
    int l = pix0[j + 1];
    int i1 = pix0[j + m_nAppX];
    int j1 = pix0[j + m_nAppX + 1];
    int i = (k & 0xff0000) >> 16;
    int k1 = ((((l & 0xff0000) >> 16) - i) * ru >> 8) + i;
    i = (k & 0xff00) >> 8;
    int l1 = ((((l & 0xff00) >> 8) - i) * ru >> 8) + i;
    i = k & 0xff;
    int i2 = (((l & 0xff) - i) * ru >> 8) + i;
    i = (i1 & 0xff0000) >> 16;
    int j2 = ((((j1 & 0xff0000) >> 16) - i) * ru >> 8) + i;
    i = (i1 & 0xff00) >> 8;
    int k2 = ((((j1 & 0xff00) >> 8) - i) * ru >> 8) + i;
    i = i1 & 0xff;
    int l2 = (((j1 & 0xff) - i) * ru >> 8) + i;
    int i3 = ((j2 - k1) * rv >> 8) + k1;
    int j3 = ((k2 - l1) * rv >> 8) + l1;
    int k3 = ((l2 - i2) * rv >> 8) + i2;
    pix0[j] = i3 << 16 | j3 << 8 | k3 | 0xff000000;
    rend();
    offImage.newPixels(0, 0, m_nAppX, m_nAppY);
    try
    Thread.sleep(m_sleepTime);
    catch(InterruptedException interruptedexception1) { }
    } while(true);
    public void update(Graphics g)
    paint(g);
    public void paint(Graphics g)
    g.drawImage(dbImg, 0, 0, this);
    public void start()
    if(isError)
    return;
    isRunning = true;
    if(runner == null)
    runner = new Thread(this);
    runner.start();
    public void stop()
    if(runner != null)
    runner.stop();
    runner = null;
    public boolean mouseMove(Event event, int i, int j)
    m_mouseX = i;
    m_mouseY = j;
    return true;
    public boolean mouseDown(Event event, int i, int j)
    m_mouseX = i;
    m_mouseY = j;
    int k = (int)(rand.nextDouble() * 256D);
    int l = (int)(rand.nextDouble() * 256D);
    int i1 = (int)(rand.nextDouble() * 256D);
    int j1 = k << 16 | l << 8 | i1 | 0xff000000;
    int k1 = 0;
    for(int l1 = 0; l1 < bits; l1++)
    if(bit_f[l1] != 0)
    continue;
    bit_px[l1] = m_mouseX;
    bit_py[l1] = m_mouseY;
    double d = rand.nextDouble() * 6.2800000000000002D;
    double d1 = rand.nextDouble();
    bit_vx[l1] = Math.sin(d) * d1;
    bit_vy[l1] = Math.cos(d) * d1;
    bit_l[l1] = (int)(rand.nextDouble() * 100D) + 100;
    bit_p[l1] = (int)(rand.nextDouble() * 3D);
    bit_c[l1] = j1;
    bit_sx[l1] = m_mouseX;
    bit_sy[l1] = m_nAppY - 5;
    bit_f[l1] = 2;
    if(++k1 == bit_max)
    break;
    if(bit_sound > 1)
    sound2.play();
    return true;
    public boolean mouseExit(Event event, int i, int j)
    m_mouseX = i;
    m_mouseY = j;
    return true;
    void rend()
    boolean flag = false;
    boolean flag1 = false;
    boolean flag2 = false;
    for(int k = 0; k < bits; k++)
    switch(bit_f[k])
    default:
    break;
    case 1: // '\001'
    bit_vy[k] += rand.nextDouble() / 50D;
    bit_px[k] += bit_vx[k];
    bit_py[k] += bit_vy[k];
    bit_l[k]--;
    if(bit_l[k] == 0 || bit_px[k] < 0.0D || bit_py[k] < 0.0D || bit_px[k] > (double)m_nAppX || bit_py[k] > (double)(m_nAppY - 3))
    bit_c[k] = 0xff000000;
    bit_f[k] = 0;
    } else
    if(bit_p[k] == 0)
    if((int)(rand.nextDouble() * 2D) == 0)
    bit_set((int)bit_px[k], (int)bit_py[k], -1);
    } else
    bit_set((int)bit_px[k], (int)bit_py[k], bit_c[k]);
    break;
    case 2: // '\002'
    bit_sy[k] -= 5;
    if((double)bit_sy[k] <= bit_py[k])
    bit_f[k] = 1;
    flag2 = true;
    if((int)(rand.nextDouble() * 20D) == 0)
    int i = (int)(rand.nextDouble() * 2D);
    int j = (int)(rand.nextDouble() * 5D);
    bit_set(bit_sx[k] + i, bit_sy[k] + j, -1);
    break;
    if(flag2 && bit_sound > 0)
    sound1.play();
    void bit_set(int i, int j, int k)
    int l = i + j * m_nAppX;
    pix0[l] = k;
    /*********************************end*******************************

    no one help me???????????

  • Java tutorial - helps, problem  is i don't understand the API

    I don't understand the JAVA Tutorials or the API

    Take two steps back.
    Buy a book on basic Java Programming. You need to understand the concepts behind programming before you should start reading the API.
    But kudos for at least trying to read the API.
    Now look at the column on the left, and follow the link called [url http://developer.java.sun.com/developer/onlineTraining/] Tutorials 
    and then the link titled [url http://java.sun.com/docs/books/tutorial/index.html]The Java Tutorial (Java Series).
    And finally read through the sections starting with [url http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html]Your First Cup of Java.
    Then once you have been through all of that, come back and ask for clarification
    on any specific points that you have trouble understanding.
    Finally (Because the Finally always gets executed) Try taking a class in java programming.
    regards

  • Help with Java Inventory Program - I almost got it

    Hello, I'm new to the forum so please don't hang me if I'm not posting this correctly or in the right place. I'm writing a Java Inventory Program for class and everything was great until we had to modify it to sort by product name (in my case dvd's). The problem is my arrays for inventory count and price are thrown off when I sort by dvd name because they are predefined. I could cheat and just rearrange the array in a logical order according to the dvd title but that isn't really the answer for me. Can someone help me do where my inventory count and price don't go out of wack when I sort by dvd name, I really don't want to start over.
    Here is my code:
    // Java InventoryProgram2
    // Purpose of application is to Display DVD Inventory
    import java.util.Arrays;
    public class InventoryProgram2 // declare public class
    { // Start of public class InventoryProgram1
         String dvdName[] = { "The Departed", "The Dark Knight","The Mummy", "Minority Report"};
         double itemNum;
         float stockCount[] = {3, 5, 8,2};
         float totalValue [] = new float [4];
         float price[] = { 19, 22, 17, 14};
         float totInvVal;
              // Method for printing dvdName the dvdName
              public void DvdName ()
              { // Start of print method
                   // For loop to calculate total value
                   Arrays.sort(dvdName);
                   for( int itemNum = 0; itemNum < dvdName.length; itemNum ++ )
                        totalValue[itemNum] = stockCount[itemNum] * price[itemNum];
                   System.out.printf( "%s %15s %12s %12s %12s\n", "Item Number", "Dvd Name", "Price", "Stock", "Total"); // Prints title of column
                   for ( int itemNum = 0; itemNum <dvdName.length; itemNum ++ )
                        System.out.printf("%-8d %20s %10.02f %12.02f %12.02f\n", itemNum, dvdName[itemNum], price [itemNum],stockCount[itemNum], totalValue[itemNum]); // Calls the value of each column
         } // end of method to print dvdName
         // Method for total value of the inventory
         public void totalInvValue()
         { //start of method to calc total inv value
         totInvVal = stockCount [0] * price [0] + stockCount [1] * price [1] + stockCount [2] * price [2] + stockCount [3] * price [3];
         System.out.printf("%s", "The Total Value of the Inventory is:","%10.02f");
         System.out.printf("$%.02f", totInvVal);
         } // end of method to calc total inv value
    } // End of public class InventoryProgram1
    // Java InventoryProgram2_Test
    // Purpose of application is to Display DVD Inventory
    public class InventoryProgram2_Test
    { // Start Bracket for InventoryProgram1
    public static void main ( String args[] )
    { // Start Bracket for Public Main
         InventoryProgram2 myInventoryProgram2 = new InventoryProgram2(); // invokes InventoryProgram1
    myInventoryProgram2.DvdName (); // calls DvdName Method
         myInventoryProgram2.totalInvValue(); // call method total inventory value
    } // End Bracket for Public Main
    } // End Bracket for InventoryProgram1
    Edited by: ozzie2132 on Aug 11, 2008 6:57 PM
    Edited by: ozzie2132 on Aug 11, 2008 6:57 PM

    a_turingmachine wrote:
    naive ex:
    class DVD {
    String dvdName;
    float stockCount;
    float price;
    }--turing machine:
    Suggestion 1: If you are going to give code for someone doing homework, try not to give exactly what the OP needs but rather something similar. They will learn a lot more if they have to process your recommendations and then create their own code.
    Suggestion 2: When posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. You may want to click on the Preview tab to make sure that your code is formatted correctly. Another way is to place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}

  • Help in starting Java Card Programming

    Hi all,
    I�m totally new here. I just started Java Card programming. However I don�t know how to start though I think I have enough stuff. I have installed Java 1.6.0_02, JCOP tool 3.1.2, run Eclipse 3.3.0. I also have a dual interface smart card reader SDI010 and some smart card (dual access). I activated JCOP Tool, created new Java Card project, but after I entered package AIDs and applet AIDs I don�t know what I should do next. I looked through several books in Eclipse (Eclipse for dummies�) but can�t find anything about Java Card. Anyone have experience in this area please help me to start. If you know any document that guides step by step, please let me know. I found source code in Sun website (wallet.java) but I really don�t know how to use it. Thanks a lot.

    Hi,
    select
    Project -> Build Automatically. It will build a .CAP file every time you changed your Java Card project code and save it. You will see it in the
    CAP file viewer in the left corner (but only in case you are developing your JC applet in Java Card in Eclipse project and opened one of the
    JCOP perspectives: either development or debug).
    P.S. I suppose, that u still haven't looked through the JCOP tools documentation in the Eclipse IDE Help menu.
    Best regards,
    Eve
    Edited by: Ieva on Nov 4, 2007 9:01 AM

  • I am running Mac OS 10.6.7 I cannot run a java based program from the net when parental controls are set the error is The error is Load: class installer.CheckVersion 13. class not found  Help!

    I am running Mac OS 10.6.7 I cannot run a java based program from the net when parental controls are set the error is The error is Load: class installer.CheckVersion 13. class not found 

    Then, talk to the person running the lab.

  • Question about java threads programming

    Hi
    I have to develop a program where I need to access data from database, but I need to it using multithreading, currently I go sequentially to each database to access data which is slow
    I have a Vector called systemnames, this one has list of all the systems I need to access.
    Here is my current code, some thing like this
    Vector masterVector = new Vector();
    GetData data = new GetData();
    For(int i =0; i < systemnames.size(); i++)
    masterVector.add(data.getData((String)systemnames.get(i));
    public class GetData
    private Vector getData(String ipaddress)
    //process SQL here
    return data;
    how do i convert this to multithread application, so there will be one thread running for each system in vector, this is speed up the process of extracting data and displaying it
    has any one done this kind of program, what are the precautions i need to take care of
    Ashish

    http://www.google.com/search?q=java+threads+tutorial&sourceid=opera&num=0&ie=utf-8&oe=utf-8
    http://java.sun.com/docs/books/tutorial/essential/threads/
    http://www.javaworld.com/javaworld/jw-04-1996/jw-04-threads.html
    http://www.cs.clemson.edu/~cs428/resources/java/tutorial/JTThreads.html
    http://www-106.ibm.com/developerworks/edu/j-dw-javathread-i.html
    When you post code, please use [code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read and prevents accidental markup from array indices like [i].

  • Brand New to Java and Programming

    I'm brand new, ( RAW ) to software programming at this time. I'm starting from scratch, I work on a Help Desk for the government so I can perform some software functionality but nothing as far as programming.. I would like recommendations for someone starting out brand new.. Books to read (JAVA for Dummies?) any beginner courses? What steps would you take if you were starting out brand new as I am myself.. Thanks..
    PS, I plan on taking courses after I get the beginning stuff out of the way, just don't want to go in with no knowledge base..

    For a nice list of stock answers: The One to Torment Newbies with
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com . A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.
    James Gosling's The Java Programming Language. Gosling is
    the creator of Java. It doesn't get much more authoritative than this.

  • I'm stuck! Following the Java Tutorial

    I'm confused :=Q
    I am following the Java tutorial and am trying to do the ClickMe applet. The html file was saved as text in notepad. I downloaded the ClickMe and Spot source files. They compiled without errors along with the html file. I double checked my DIR and saw that I had the class files. When I went to run the applet, the little window appeared without any spot and said something about Clickme class in the heading border and then in the box it said applet not initialized. So, I went through the forum and looked for anything similar and I saw that someone said to compile like:C:\jdk1.3.1_01 javac ClickMe.java Spot.java
    So, I tried that, and I still have class files, but now I don't have the applet box showing anymore and I don't get any errors. I was successful when I did the Hello World applet, so I know it's not a class path problem or text prob. I was using typing appletviewer ClickMe.html
    I'm getting so hungup on trying to get the applets to work I am losing track of how and why they are supposed to work. It is so discouraging especially when there doesn't seem to be anyone in particular to ask.
    Does anyone have anything encouraging to offer?
    I am using JDK 1.3 on WinXP (Java has been totally enabled without using the plug in) It has worked successfully.
    Thanks in advance once again for your help.
    Karen

    I'm learning with the tutorial also ;)
    Makes about 3 months I'm doing so, and from my experience, it is much more fun to create Programs than Applets.. I always work with Swing and it is a pain to use it inside Applets (but Swing is really great to create GUIs..) Learning how to build Jar and how to use Swing helps you building up Jar files that run like EXEs ;) That gives good results!

  • Java tutorial suggestion

    Hi Guru
    I am newbie i wish to learn Java, to improve my stills and to find jobs in java related domain
    I need your help to get succeed please suggest your opinion
    1)Is that easy to learn Java by Self? I know little bit (Threotically) But technical wise i am not that much sound ..
    2)If i what to be good in techical means ?what should i want to do ..
    3)Is it bettet to go for training center . I have already Paid 18k For learning java in one instute but didnt gain the practical knowledge .they have not given me training as per the company prospects..so i am sound only theotical
    I can test my skill and i found that i am not that much good in programming
    4)I there any best place for training in Chennai (To teach my prcatically and as per the company aspects
    5)It ll be bets to learn by self purchasing Book like that and go for it since i know some logic but implementing that logic i am bad
    6)with out getting the details i have wasted my money once again iam not ready to waste money so i need your suggetsion
    So please suggent me the best way to start my carrier in Java
    It will be highly appreciable for your help
    Aarasu

    850225 wrote:
    I am newbie i wish to learn Java, to improve my stills and to find jobs in java related domainOkay. Generally you would do that "on the job" though. More on that later.
    >
    1)Is that easy to learn Java by Self? I know little bit (Threotically) But technical wise i am not that much sound ..The language is not that hard to learn. The platform and the architectural insight generally take years to develop, all through working experience.
    2)If i what to be good in techical means ?what should i want to do ..Start at the very beginning; learn the language and the tools. The online java tutorial could be enough.
    3)Is it bettet to go for training center . I have already Paid 18k For learning java in one instute but didnt gain the practical knowledge .they have not given me training as per the company prospects..so i am sound only theoticalNo, I wouldn't do that. It is better to learn by doing, and that you can do yourself. You cannot be told HOW to program, only where to look and what to focus on. The rest is up to you in any case. Generally you don't only read a book or listen to a lecture; you actually make something and through research, reasoning and some trial and error you gradually figure out how to do things. And after that you figure out what works well and what doesn't in specific situations.
    I can test my skill and i found that i am not that much good in programming
    4)I there any best place for training in Chennai (To teach my prcatically and as per the company aspectsA school? Most of us start out there, although I still stand by my earlier comment that it is mostly up to you to learn this stuff.
    5)It ll be bets to learn by self purchasing Book like that and go for it since i know some logic but implementing that logic i am badYeah that is a big issue. You cannot force yourself to understand these things, if you have big problems with logical reasoning and thinking then programming simply isn't for you.
    6)with out getting the details i have wasted my money once again iam not ready to waste money so i need your suggetsion
    So please suggent me the best way to start my carrier in Java Really, I would first ask yourself if a career in development really is for you. Perhaps you shouldn't focus on Java development but for example look at Ruby development. Maybe Java at this point is simply too big a step for you.

  • JMS Java Tutorial Problems

    Hi nice forum,
    I'm trying out the Quickstart Tutorial that comes with the documentation at http://docs.sun.com/source/816-5923-10/tutorial.html and getting some errors.
    Before I paste lines of source code and error messages - is this an appropriate place to ask for java programming help? If not, could someone point me to the correct forum?
    TIA,
    Jools

    Yes, questions/comments on the tutorial are welcome here.
    What problems/errors are you seeing ?

Maybe you are looking for

  • Parseing an XML Document as a String

    Hi all, i am trying to parse an XML document to a parser. I get the file as a request parameter, which is filled in to at String variable. But for some reason i get an SAXException, does anyone se the problem? Thank you for your help... Below is the

  • Cash discount on Purchases at Two Levels

    Hi Guru's I have an issue on Cash discount on purchases. My client has a discount facility with the vendor at two levels: 1. On the base price (After this discount Excise Duty is calculated) 2. After Excise Duty but before VAT (Local Tax) calculation

  • How Do I Catalog or List Everything on a Hard-Drive?

    I'm hoping this is the right category to post this. Here is the situation... I have several external drives that contain movies ripped for my Apple TV. Many are nested in specific folders (i.e. Drama, Horror, Classics, etc... as well as by director).

  • Chinese Characters in PDF

    Hi all, I am sending some data by creating spool and then mailing it as a PDF attachment. However, when i get the PDF file through mail, I cannot see the Chinese characters. The document contains the information in English as well as Chinese. However

  • Generic Delta for table MVKE

    I need to extract material sales data from table MVKE. I want to use generic delta datasource but I'm not sure based on which field I need to load delta. Any suggestions? Is it possible to use generic delta for MVKE?