Java Matching and Patterns - help please.

Ok, so I'm trying to take a CSV file and store it as an XML file using Java. Here's a sample line of the data file I'm working with:
1001,"Fitzsimmons, Des Marteau, Beale and Nunn",109,"COD","Standard",,109,8/14/1998 8:50:02
I'm trying to use regular expressions to match each field separately. I can't use split on "," because of the commas in the quotes (which is one whole field). So far, the first field matches to "[0-9]+," What would be the regex for the second field? "\".+\"," doesn't work, and I'm running out of ideas.

I know this doesn't help the immediate problem, but I just have to say that this is the reason why comma is not a good separator. Why doesn't the world wake up and use tabs? I would assert that the chance of a value containing an embedded tab character is slim to none, whereas the chance that it contains any "printable" character is much greater - leading to this very headache.
So actually this might help afterall, if you can get the separator changed.

Similar Messages

  • HT5622 After installing iTunes Match I have lots most of my iTunes songs and albums help please

    After installing iTunes Match I have lost most of my songs and albums help?

    iTunes Match on the computer will not change the library content.  The iTunes Match 3 step process must complete on the computer based library before being associated with any IOS devices.
    It is always important to make a secure backup of your Song files prior to these activities.

  • JSP and Servlet - help please

    Hello,
    I am making this feedback for fun and a bit of learning too. I have an INDEX.JSP page, where the user selects the very first option. Depending upon the selected option he is moved another page PRODUCTFEEDBACK.JSP (so far I have completed this). Here as usual there are many fields to be filled in. As a spams protection i have done this;
    I have a AdditionClass, which is a seperate class where two number are generated at random. This numbers are called by PRODUCTFEEDBACK.JSP. The user is then asked to perform the addition. The completed form is then sent to ProductFeedback servlet.
    When I compile my PRODUCTFEEDBACK.JSP I get this error. Can you please tell whats wrong?
    PRODUCTFEEDBACK.JSP
          *<td>Please help us to prevent Spams by performing this simple mathematical Calculation. We appreciate your effort </td>*
        *</tr>*
      *</table>*
      *<jsp:useBean id = "AddTest" class = "go.AdditionClass" />*
      *<table width="53%"  border="0" align="center">*
        *<tr>*
          *<td><div align="center">*
      *<input name="textfield8" type="text" size="3" value ="<jsp:getProperty name="AddTest" property = "randNum1" />">*
    *  + * 
      *<input name="textfield9" type="text" size="3" value="<jsp:getProperty name="AddTest" property = "randNum2" />">*
    *  = *
    *<input name="_total" type="text" size="5">*
          </div></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
      </table>
      <br>
      <table width="37%" height="23"  border="0" align="center">
        <tr>
          <td width="33%"> </td>
          <td width="67%"><input type="submit" name="Submit" value="Click here to send us this form"></td>
    AdditionalClass.java
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package go;
    import java.util.Random;
    * @author MAC
    public class AdditionClass {
        Random generator = new Random();
        int randNum1; // First Random Number
        int randNum2; // Second Random Number
        public void SetNum1(){
            randNum1 = generator.nextInt(10); // Generate First Random Number
        public int getNum1(){
            return randNum1; //Return First Random Number
        public void SetNum2(){
            randNum2 = generator.nextInt(10); // Generate Second Random Number
        public int getNum2(){
            return randNum2; // Return Second Random Number
        // send the Random Numbers to ProductFeedback class
        public void productFeedbackRandNum1(){
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber1(randNum1);
        public void productFeedbackRandomNum2(){
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber2(randNum1);
    }Erros that I am getting:
    org.apache.jasper.JasperException: Cannot find any information on property 'randNum1' in a bean of type 'go.AdditionClass'
    C:\Documents and Settings\MAC\My Documents\NetBeansProjects\FeedBack\nbproject\build-impl.xml:462: The following error occurred while executing this line:
    C:\Documents and Settings\MAC\My Documents\NetBeansProjects\FeedBack\nbproject\build-impl.xml:440: Java returned: 1
    BUILD FAILED (total time: 1 second)

    Thank you for replying. I modified my Bean class then what is posted above, so thought to repost the code again and seek help. There seems to be no error now but it just dont generate any random numbers, All i get very time is 0. I am wondering, is my code generating 0 as random number, every time :-)
    package go;
    import java.util.Random;
    public class AdditionBean {
        int randNum1; // First Random Number
        int randNum2; // Second Random Number
        public void generateRandomNum1(){
            Random generator = new Random();
            int num1 = generator.nextInt(10);
            SetRandNum1(num1);
            // Send num1 value to ProductFeedback.java
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber1(num1);
        } // End of generaeRandomNum1
        public void generateRandomNum2(){
            Random generator = new Random();
            generator = new Random();
            int num2 = generator.nextInt(10);
            SetRandNum2(num2);
            // Send num1 value to ProductFeedback.java
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber2(num2);
        } // End of generateRandomNum2
        public void SetRandNum1(int num1){
            randNum1 = num1;
        public int getRandNum1(){
            return randNum1; //Return First Random Number
        public void SetRandNum2(int num2){
            randNum2 = num2;
        public int getRandNum2(){
            return randNum2; // Return Second Random Number
    }// End of classThank you,

  • After effects and photoshop ,,,help please

    hi all
    can anybody help please.
    ive been making a short film with my son and putting some basic effects in, just for a laugh.
    i noticed an effect on ADOBE TV that was done by Gareth Edwards in his movie MONSTERS which i thought would be good to try out in my film but i carnt get it right,,
    here is the link to that effect...            http://tv.adobe.com/watch/customer-stories-video-film-and-audio/monsters/
    its the effect where he changes the menu board in a cafe to one of his infected area signs, he allso changes a few other signs.
    in the video he say that he exports a still frame from after effects into photoshop and puts on his image {with a few tweaks her and there}, when hes got it ok in photoshop ,it some how updates in after effects??
    can any please help ,thank you

    It's a simplified explanation of the process.  He left out explanations of motion tracking and perspective matching that were most certainly required for the shot being discussed.
    If you are doing the same process to a static, locked off shot, with no foreground objects passing in front of your sign, it would be very possible to create a single frame in Photoshop and just layer it over your scene in AE.  But once the camera moves, you will need to understand Motion Tracking.  If objects pass in front of the replaced component, you will need to understand Masking.

  • I can't open adobe illustrator CS6 -Java  issues, can anyone help please

    I can't open adobe illustrator CS6 - I downloaded latest java for OSx, and it still directs me to download Java 6.  Can anyone help please, thanks

    Java for OS X 2014-001 10.7 or later

  • Java, postgres and jasper help

    hi all,
    i am trying to fix this bug within my program. its a java, postgres and
    jasper based program which generates charts. now i am generating a
    chart which does not show any 0 data points if they exist, only
    non-zero ones. obviously i am trying to do everything in just one sql
    query, but i am not sure if its possible or not. i also need to
    generate a temporary table and then delete it.
    I have broken the tasks into,
    1. create a temp table
    2. create records for 0 data points
    3. update with non 0 records
    4. delete temp table.
    now this is what i have and i would appreciate all help with fixing
    this,
    public void createTempTubProdTable(String filter, String tableName)
    throws SQLException {
    String sqlStr = "";
    String sqlWhereStr = " WHERE ";
    Debug.println("FILTER: " + filter);
    if (filter != null)
    sqlWhereStr = sqlWhereStr + filter;
    else
    sqlWhereStr = sqlWhereStr + "'?' = '?'";
    String sqlCreateTableStr = "" +
    "CREATE TABLE \"public\".\"tubprod_temp\" ( " +
    " \"tubprod_event\" BIGSERIAL, " +
    " \"edit_time\" TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT now(), " +
    " \"edit_time_count\" BIGINT, " +
    " CONSTRAINT \"tubprod_temp_pkey\" PRIMARY KEY(\"tubprod_event\") " +
    ") WITHOUT OIDS; ";
    String sqlInsertDataStr = " " +
    " INSERT INTO tubprod_temp (edit_time,edit_time_count) " +
    " SELECT to_timestamp(to_char (last_edit_timestamp,'YYYY-MM-DD
    HH24:00:00'), 'YYYY-MM-DD HH24:00:00')AS edit_time, count(to_char
    (last_edit_timestamp,'YYYY-MM-DD HH24:00:00')) as edit_time_count " +
    " FROM " + tableName + " " + sqlWhereStr +
    " GROUP BY to_char (last_edit_timestamp,'YYYY-MM-DD HH24:00:00') " +
    " ORDER BY to_char (last_edit_timestamp,'YYYY-MM-DD HH24:00:00'); ";
    Debug.println("sqlInsertDataStr: " + sqlInsertDataStr);
    Statement stmt = conn.createStatement();
    // Create temporary tub production table
    sqlStr = sqlCreateTableStr + sqlInsertDataStr;
    Debug.println(sqlStr);
    stmt.executeUpdate(sqlStr);
    public void deleteTempTubProdTable() throws SQLException {
    Statement stmt = conn.createStatement();
    // Drop temporary tub production table
    String sql = "DROP TABLE tubprod_temp;";
    stmt.executeUpdate(sql);
    }

    Crosspost

  • Mail and password: Help please!!!

    I have changed my password and on my iPhone and iPad there is no problem. However, on my iMac, 10.8.2 every time I put the computer to sleep and then wake it up again Mail tells me to verify my password. I press OK but it refuses to accept and I am forced to go to System Preferences, then mail where I press OK for the same password and the whole thing then works.
    In Yahoo it works perfectly!
    What is happening in Mail. I have deleted the account in preferences and set it up again but all to no avail.
    Help please!!!

    You might try the following steps:
    Restart the device by holding down the on/off button until the power down slider appears.
    Try entering your password in another location (i.e. when you are using a different wifi network)
    Reset all settings (settings > general > reset), this resets some of your settings to factory default. It’s not a complete removal of settings. It removes all of your preferences for Wi-Fi, Bluetooth, Do No Disturb, Notifications, General, Sounds, Brightness & Wallpaper and Privacy. It does not remove any of your data.
    Try signing out of iCloud and back in (only if find my phone is disabled)
    If this doesn’t help your best option may be to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.

  • My iPod touch has no sound from music and videos help please

    My iPod touch has no sound at all, help please guys.

    - The restore from backup
    - If still problem restore to factory defaults/new iPod.
    - Last, make an appointment at the Genius Bar of an Apple store.

  • Pattern and Matcher problem. Help Please!

    I am trying to make the user enter a correct US$ in HTML(jsp format) ie 12.34 but not 12.3456. As far as i know, the regular expression below is correct for $$.
    but the there is no error even if the user types 12.34567
    can anyone help me please?
    this is the code i wrote...
    public static final int DATA_ENTRY = 1;
    public static final int INVALID_CURRENCY = 2;
    public static final int PROCESS_INPUT = 3;
    int state;
    String a; //data input from user
    Pattern p = Pattern.compile("\\d{1,3}(?:(?:,\\d\\d\\d)*|\\d*)(?:\\.\\d\\d)?");
    Matcher m = p.matcher(a);
    state = DATA_ENTRY; // this is default
    if (m.find() {
         state = PROCESS_INPUT;
    else {
         state = INVALID_CURRENCY;

    Here's two pattern strings that both require a two-place fraction for each entry but do not permit more than two places.
    import java.util.regex.*;
    public class snggun {
      public static void main(String[] args) {
        String input = (args.length > 0 ? args[0] : "10.00");
    //    String mask = "\\d{1,3}(?:(?:,\\d\\d\\d)*|\\d*)(?:\\.\\d\\d)?";
        // requires two-place fraction
    //    String mask = "^(\\d{1,3})(,(\\d\\d\\d))*(\\.\\d\\d)\\z";
        // requires two-place fraction
        String mask = "\\d{1,3}(?:(?:,\\d{3})*|\\d*)(\\.\\d{2})\\z";
        Pattern pattern = Pattern.compile(mask);
        Matcher match = pattern.matcher(input);
        System.out.println("input = " + input + " qualifies " + match.find());
        if(match.find())
          for(int j = 0; j <= match.groupCount(); j++)
            System.out.println("group " + j + "  " + match.group(j));
    }

  • I'm new to java and need help please(repost)

    I have an assignment involves modifying a previous assignment. the code for the previous assigment is shown below.(it was required to be done as an applet this assigment can be an application or an applet) I'm trying to modify this code to read a text file (items.txt) that looks like this:
    item # description price(this line does not appear in the text file)
    001 shaving cream 400.00
    999 razors 30.00
    I need to load the item# and price from the text file into arrays(I have no clue how to use multi-dimensional arrays in java and would prefer not to)
    I need to search the arrays based on the values entered by the user (item # and quantity) calculate the total for that item then create a new text file which has each line item for that order in the form:
    item# quant price per item total(price per item*quant entered)
    also also I need to be able to display the four items listed above after each loop as well as all the previous item number and quantities they selected until they indicate they don't want to select anymore.
    I've been working on this for days and it seems like nothing I try works. My major problems are:
    1. I have no idea how to read the text file and load those 2 items into their respective arrays
    2. I can't seem to create a textfile that looks like text for the output file.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.text.*;
    import java.util.Locale;
    public class arraySelection
        extends JApplet {
      //Initialize the applet
      private Container getContentPane=null;
      public void init() {
           String string_item, string_quantity;
           String output = "";
           String description= "";
           int counter= 0;
           int itemNumber= 0;
           double quantity = 0 ;
           double tax_rate=.07;
           double total= 0, price= 0;
           double tax, subtotal;
           double Pretotal= 0;
           double priceArray[] = {1, .5, 3.65, 0.02, 0.09};
           String descriptionArray[] = {"salt", "pepper", "paprika", "garlic", "thyme"};
         // create number format for currency in US dollar format
         NumberFormat moneyFormat = NumberFormat.getCurrencyInstance( Locale.US );
         //format to have the total with two digits precision
         DecimalFormat twoDigits = new DecimalFormat("0.00");
         //Jtextarea to display results
         JTextArea outputArea = new JTextArea ();
         // get applet's content pane
          Container container = getContentPane ();
          //attach output area to container
          container.add(outputArea);
         //set the first row of text for the output area
        output +=  "Invoice\nItem#\tDescription\tQuant@Price\t Line Total" + "\n";
        do //begin loop structure obtain input from user
               // obtain item number from user
               string_item = JOptionPane.showInputDialog(
                   "Please enter an item number 1, 2, 3, 4, or 5:");
               //obtain quantity of each item that user enter
               string_quantity = JOptionPane.showInputDialog("Enter the quantity:");
               // convert numbers from type String to Integer or Double
               itemNumber = Integer.parseInt(string_item);
               quantity = Double.parseDouble(string_quantity);
                 switch (itemNumber) {//Determine input from user to assign price and description
                    case 10: // user input item =10
                      price = priceArray[0];
                      description = descriptionArray[0];
                      break;
                    case 20: // user input item =20
                      price = priceArray [1];
                      description = descriptionArray[1];
                      break;
                    case 30: //user input item =30
                      price=priceArray[2];
                      description = descriptionArray[2];
                      break;
                    case 40: //user input item =40
                      price=priceArray[3];
                      description = descriptionArray[3];
                      break;
                    case 50: //user input item =50
                      price=priceArray[4];
                      description = descriptionArray[4];
                      break;
                    default: // user input item is not on the list
                    output += "Invalid value entered"+ "\n";
                    price=0;
                    description= "";
             //Calculates the total for each item number and stores it in subtotal
             subtotal = price * quantity;
             //display input from user
             output += itemNumber + "\t" + description + "\t\t"+ quantity + "@" +
                       moneyFormat.format( price) + "\t" + moneyFormat.format( subtotal) + "\n";
             //accumulates the overall subtotal for all items
             Pretotal = Pretotal + subtotal;
            //verifies that the user wants to stop entering data
            string_item = JOptionPane.showInputDialog(" Enter a positive integer to continue or 0 to stop. ");
            itemNumber = Integer.parseInt(string_item);
          // loop termination condition if user's input is 0 .It will end the loop
       } while ( itemNumber!= 0);
        tax = Pretotal * tax_rate; // calculate tax amount
        total = Pretotal + tax; //calculate total = subtotal + tax
        //appends data regarding the subtotal, tax, and total to the output area
        output += "\n" + "Order Subtotal" + "\t" + moneyFormat.format( Pretotal) +
                  "\n" + "Tax" + "\t\t" + twoDigits.format( tax ) + "\n" + "Order Total" +
                  "\t\t" + moneyFormat.format( total );
         //attaches the data in the output variable to the output area
         outputArea.setText( output );
      } //end init
    }// end applet InvoiceAny help or sugestions would be greatly appreaciated. I've been working on this for over a week and everything I try goes nowhere.

    First answer: You shouldn't ask multiple questions in the same thread. Ask a specific question, with an appropriate subject line (optionally, assign the number of Dukes you are willing to give for the help). When question #1 is answered and question #2 arises, it's time for a new thread (don't forget to give out Dukes before moving on).
    Second answer: I think you need a Transfer Object (http://java.sun.com/blueprints/patterns/TransferObject.html). It's whole purpose is to hold/transfer instance data where it is needed. Create a class something like this:
    public class ItemTO
        private String _number;
        private String _description;
        private double _price;
        public ItemTO( String number, String description, double price )
            _number = number;
            _description = description;
            _price = price
        // Getter/Setter methods go here
    }then, in the code where you read in the file do something like this:
    BufferedReader input = null;
    try
        input  = new BufferedReader( new FileReader( "c:\\a.txt" ) );
        List items = new ArrayList();
        String line;
        String itemNumber;
        String itemDescription;
        double itemPrice;
        while ( (line  = input.readLine() ) != null )
         System.out.println( line );
            itemNumber = // Parse it from line
            itemDescription // Parse it from line
            itemPrice = // Parse it from line
            items.add( new ItemTO( itemNumber, itemDescription, itemPrice ) );
    catch ( FileNotFoundException fnfe )
        fnfe.printStackTrace();
    catch ( IOException ioe )
        ioe.printStackTrace();
    finally
        try
            if ( input != null )
                input.close();
        catch ( Exception e )
            e.printStackTrace();
    }As for how to parse the line of the file, I'll leave that to you for now. Are the three values delimited with any special characters?
    jbisotti

  • I was always instructed by Apple to install all updates.  I followed their advice and my Java disappeared and I can no longer play pogo scrabble.  pogo's "advice" to install Java is useless.  HELP PLEASE!

    I was always instructed by Apple to install all new updates offered.  When I installed the last one on my 10.5.7 macbook, my java disappeared.  Java's advice is useless.  I can no longer play pogo scrabble without java.  Please help.  Thank you very much.

    MadMAC0 posted at https://discussions.apple.com/message/20107182?ac_cid=tw123456#20107182 that:
    Apple has posted (10/22/12) the approved solution for restoring the Java 6 plug-in:
    Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality.

  • I'm new to java and need help please

    I have an assignment involves modifying a previous assignment. the code for the previous assigment is shown below.(it was required to be done as an applet this assigment can be an application or an applet) I'm trying to modify this code to read a text file (items.txt) that looks like this:
    item # description price(this line does not appear in the text file)
    001 shaving cream 400.00
    999 razors 30.00
    I need to load the item# and price from the text file into arrays(I have no clue how to use multi-dimensional arrays in java and would prefer not to)
    I need to search the arrays based on the values entered by the user (item # and quantity) calculate the total for that item then create a new text file which has each line item for that order in the form:
    item# quant price per item total(price per item*quant entered)
    also also I need to be able to display the four items listed above after each loop as well as all the previous item number and quantities they selected until they indicate they don't want to select anymore.
    I've been working on this for days and it seems like nothing I try works. My major problems are:
    1. I have no idea how to read the text file and load those 2 items into their respective arrays
    2. I can't seem to create a textfile that looks like text for the output file.
    code]
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.text.*;
    import java.util.Locale;
    public class arraySelection
    extends JApplet {
    //Initialize the applet
    private Container getContentPane=null;
    public void init() {
    String string_item, string_quantity;
    String output = "";
    String description= "";
    int counter= 0;
    int itemNumber= 0;
    double quantity = 0 ;
    double tax_rate=.07;
    double total= 0, price= 0;
    double tax, subtotal;
    double Pretotal= 0;
    double priceArray[] = {1, .5, 3.65, 0.02, 0.09};
    String descriptionArray[] = {"salt", "pepper", "paprika", "garlic", "thyme"};
    // create number format for currency in US dollar format
    NumberFormat moneyFormat = NumberFormat.getCurrencyInstance( Locale.US );
    //format to have the total with two digits precision
    DecimalFormat twoDigits = new DecimalFormat("0.00");
    //Jtextarea to display results
    JTextArea outputArea = new JTextArea ();
    // get applet's content pane
    Container container = getContentPane ();
    //attach output area to container
    container.add(outputArea);
    //set the first row of text for the output area
    output += "Invoice\nItem#\tDescription\tQuant@Price\t Line Total" + "\n";
    do //begin loop structure obtain input from user
    // obtain item number from user
    string_item = JOptionPane.showInputDialog(
    "Please enter an item number 1, 2, 3, 4, or 5:");
    //obtain quantity of each item that user enter
    string_quantity = JOptionPane.showInputDialog("Enter the quantity:");
    // convert numbers from type String to Integer or Double
    itemNumber = Integer.parseInt(string_item);
    quantity = Double.parseDouble(string_quantity);
    switch (itemNumber) {//Determine input from user to assign price and description
    case 10: // user input item =10
    price = priceArray[0];
    description = descriptionArray[0];
    break;
    case 20: // user input item =20
    price = priceArray [1];
    description = descriptionArray[1];
    break;
    case 30: //user input item =30
    price=priceArray[2];
    description = descriptionArray[2];
    break;
    case 40: //user input item =40
    price=priceArray[3];
    description = descriptionArray[3];
    break;
    case 50: //user input item =50
    price=priceArray[4];
    description = descriptionArray[4];
    break;
    default: // user input item is not on the list
    output += "Invalid value entered"+ "\n";
    price=0;
    description= "";
    //Calculates the total for each item number and stores it in subtotal
    subtotal = price * quantity;
    //display input from user
    output += itemNumber + "\t" + description + "\t\t"+ quantity + "@" +
    moneyFormat.format( price) + "\t" + moneyFormat.format( subtotal) + "\n";
    //accumulates the overall subtotal for all items
    Pretotal = Pretotal + subtotal;
    //verifies that the user wants to stop entering data
    string_item = JOptionPane.showInputDialog(" Enter a positive integer to continue or 0 to stop. ");
    itemNumber = Integer.parseInt(string_item);
    // loop termination condition if user's input is 0 .It will end the loop
    } while ( itemNumber!= 0);
    tax = Pretotal * tax_rate; // calculate tax amount
    total = Pretotal + tax; //calculate total = subtotal + tax
    //appends data regarding the subtotal, tax, and total to the output area
    output += "\n" + "Order Subtotal" + "\t" + moneyFormat.format( Pretotal) +
    "\n" + "Tax" + "\t\t" + twoDigits.format( tax ) + "\n" + "Order Total" +
    "\t\t" + moneyFormat.format( total );
    //attaches the data in the output variable to the output area
    outputArea.setText( output );
    } //end init
    }// end applet Invoice
    Any help or sugestions would be greatly appreaciated. I've been working on this for over a week and everything I try goes nowhere.

    item # description price(this
    line does not appear in the text file)
    001 shaving cream 400.00
    999 razors 30.00
    I need to load the item# and price from the text file
    into arrays(I have no clue how to use
    multi-dimensional arrays in java and would prefer not
    to)That's good, because you shouldn't use multidimensional arrays here. You should have a one-dimensional array (or java.util.List) of objects that encapsulate each line.
    I've been working on this for days and it seems like
    nothing I try works. My major problems are:
    1. I have no idea how to read the text file and load
    those 2 items into their respective arrays
    2. I can't seem to create a textfile that looks like
    text for the output file.The java.io package has file reading/writing classes.
    Here's a tutorial:
    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • My first java programming - Need some help please!!!

    I have to create a simple java program which i am not good at i am ok in C but my java is quite bad. The program need to define a class called Student and with a string called StudentNAme, a integer StudentID(key), An array of 8 integers called Marks that holds the students marks for 8 modules. It also says Include appropriate accessors, mutators and constructor(s) as well as a method to update the student�s marks. Anybody please help me in this question. I prefer an simple example of this program so I can learn faster, I dont even know how to declare a class.. So sorry but please help me out and thanks in advance

    I would also suggest you try using an IDE like
    eclipse (free)
    www.eclipse.org
    This will help you get a working program much faster.But please do also tell them that if they have troubles using it, they're supposed to read the IDE manual instead of posting here.

  • Java concepts! Need help please!

    hi,
    im new to java, just started learning, im stuck on this last question in my assignment:
    Could anyone please help with answer:
    "Describe the followion OO programming concepts, explaining how they can be used to improve the writing and maintenance of software programs:
    Classes
    Objects
    Inheritence
    Overloading
    Overriding
    Interfaces"
    its worth 25 marks of the assignment.
    all help is appreciated
    Thanks

    Well, I suggest doing a search via google (the Internet has quite a bit of computer-related information available on it), or consulting more books. Go to your local public library or university library if you have one. You'll not learn much by copying down answers posted here.
    Lee

  • I dont install the wallet sample to java card with gpshell . help please .?

    Hi
    I use Gemalto pc twin Reader.
    I try jdks(1.3.5 , 1.5 , 1.6 versions) for compile
    I use java card kit (2.1.1 , 2..1.2 , 2.2.1 ,2.2.2 versions) for create cap files
    For loadin used gpshell (1.4.2 , 1.4.1 , 1.3.1 versions)
    script
    enable_trace
    establish_context
    card_connect
    select -AID a0000000030000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
    install_for_load -pkgAID a00000006203010C06 -nvCodeLimit 500 -sdAID A000000003000000
    load -file wallet.cap
    install_for_install -priv 02 -AID a00000006203010C0601 -pkgAID a00000006203010C06 -instAID a00000006203010C0601 -nvDataLimit 500
    get_status -element 20                                   
    card_disconnect
    release_context
    I didnt load wallet applet to card. Some time I take install_for_load error , some time install_for_install_and_make_selectable()
    Please help me.
    With jdk 1.3_5 , java card dev kit 2.1.2 and gpshell , I load applet to card but dont install and I take install_for_install_and_make_selectable returns 0x80206A80 (6A80 : Wrong data / incorrect values in command data) error.
    I dont understand why dont loaded the applet to card. Actually I load and install HelloWorld.cap file as this way.
    Additionally , In the wallet applet , the register method used as resigter(bArray , ..... .

    Anybody help me please. It very important. :(

Maybe you are looking for