User Profile

Collapse

Profile Sidebar

Collapse
Jromero
Jromero
Last Activity: Nov 28 '07, 08:53 PM
Joined: Sep 29 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Jromero
    started a topic Java Exceptions
    in Java

    Java Exceptions

    Hi,

    Here is the code - The program does not provide any message to the user when no argument is pass

    [code=java]
    public class Hexnumbers{


    public static int conv1(String s)
    throws NumberFormatExc eption {

    String digits = "0123456789ABCD EF";
    s = s.toUpperCase() ;
    int val = 0;
    for (int i = 0; i < s.length(); i++) {...
    See more | Go to post
    Last edited by JosAH; Nov 28 '07, 08:59 PM. Reason: correct [code=java] ...[/code] tags

  • Jromero
    started a topic Chained Exceptions
    in Java

    Chained Exceptions

    Hi,

    I have a problem with chained the exceptions. I know the try and catch should be in main method but in this case I have 2 methods and the main method needs to throws an exception
    The exception is called NumberFormatExc eption

    I need Help..

    Code[

    public class Hexnumbers{


    public static int conv1(String s) {
    String digits = "0123456789ABCD EF";...
    See more | Go to post

  • Jromero
    replied to Printing a sort array
    in Java
    Thank you so much is working now ....
    See more | Go to post

    Leave a comment:


  • Jromero
    replied to Printing a sort array
    in Java
    Here is the code for Vehicle class

    Can you explain what you wrote about the comparable array, because I still don't get it

    code[


    public class Vehicle {


    private double maxSpeed;
    private double price;
    private String color;

    public Vehicle() {

    }

    public Vehicle(double maxSpeed, double price, String...
    See more | Go to post

    Leave a comment:


  • Jromero
    started a topic Printing a sort array
    in Java

    Printing a sort array

    I have a problem with printing the array



    Here is the print out



    Picture a vehicle number 1 : What's it's max speed?

    100

    Picture a vehicle number 2: What's it's max speed?

    20

    Picture a vehicle number 3: What's it's max speed?

    5

    Picture a vehicle number 4: What's it's max speed?

    5...
    See more | Go to post
    Last edited by Ganon11; Nov 21 '07, 04:10 AM. Reason: Please use the [CODE] tags provided.

  • Jromero
    replied to Read a file
    in Java
    I am still having problems I don't where to put the object stream
    See more | Go to post

    Leave a comment:


  • Jromero
    replied to Read a file
    in Java
    The
    Code[
    ObjectOutputStr eam o = new ObjectOutputStr eam(new FileOutputStrea m("roaster.txt" ));
    Student s = new Student("String lastName, String firstName, String middleName, int sid, double units, String Programs", null, null, 0, 0, null);
    o.writeObject(s );

    ObjectInputStre am i = new ObjectInputStre am(new FileInputStream ("roaster.txt") );
    Student _s = (Student)i.read Object();...
    See more | Go to post

    Leave a comment:


  • Jromero
    replied to Read a file
    in Java
    I still don't get it please help me
    See more | Go to post

    Leave a comment:


  • Jromero
    replied to Read a file
    in Java
    My code
    [

    public class Student{
    private String lastName;
    private String firstName;
    private String middleName;
    private int sid;
    private double units;
    private String Programs;


    public Student(){
    this( "", "", "", 0, 0.0, "");
    }

    public Student (String lastName, String firstName, String middleName,...
    See more | Go to post

    Leave a comment:


  • Jromero
    started a topic Read a file
    in Java

    Read a file

    My code
    [

    public class Student{
    private String lastName;
    private String firstName;
    private String middleName;
    private int sid;
    private double units;
    private String Programs;


    public Student(){
    this( "", "", "", 0, 0.0, "");
    }

    public Student (String lastName, String firstName, String...
    See more | Go to post

  • I have hard time with arrays can you please help me
    [code=java]
    public static int conv1(String s) {
    String digits = "0123456789ABCD EF";
    s = s.toUpperCase() ;
    int val = 0;
    for (int i = 0; i < s.length(); i++) {
    char c = s.charAt(i);
    int d = digits.indexOf( c);
    val += d*Math.pow(16, s.length()-1-i);[/code]...
    See more | Go to post
    Last edited by pbmods; Oct 5 '07, 09:51 PM. Reason: Added CODE tags.

    Leave a comment:


  • Here is my code
    [code=java]
    //LabAssignment2
    //Jessica Romero -10-05-07
    public class Numbers{

    public static int conv1(String s) {
    String digits = "0123456789ABCD EF";
    s = s.toUpperCase() ;
    int val = 0;
    for (int i = 0; i < s.length(); i++) {
    char c = s.charAt(i);
    int d = digits.indexOf( c);
    ...
    See more | Go to post
    Last edited by pbmods; Oct 5 '07, 09:51 PM. Reason: Added CODE tags.

    Leave a comment:


  • Calculating the sum of an array with decimal & hexadecimal elements.

    I need to add the sum of hex and decimal
    right now is not adding anything

    A5
    165
    A5
    165A50
    FAA
    4010
    FAA
    4010FAA0
    Here is my code
    [code=java]
    public class Numbers{

    public static int Numbers(String s) {
    String digits = "0123456789ABCD EF";
    s = s.toUpperCase() ;
    int val = 0;
    ...
    See more | Go to post
    Last edited by Ganon11; Oct 5 '07, 07:02 PM. Reason: Fixing [CODE] tags.

  • Jromero
    replied to Employee Class - symbol problem
    in Java
    Thank you, I will change the spelling
    See more | Go to post

    Leave a comment:


  • Jromero
    replied to Employee Class - symbol problem
    in Java
    My spelling is correct ... I don't see any problem.... please help me
    See more | Go to post

    Leave a comment:


  • Jromero
    started a topic Employee Class - symbol problem
    in Java

    Employee Class - symbol problem

    Hi

    I am getting this error message ...can anyone help me out?????

    C:\Documents and Settings\Jessic a Romero\Desktop\ Employee.java:2 3: cannot find symbol
    symbol : method sethourlySalary (double)
    location: class Employee
    sethourlySalary (hourlyS);
    ^
    C:\Documents and Settings\Jessic a Romero\Desktop\ Employee.java:2 4: cannot find symbol
    symbol : method setweeklyHours( double)...
    See more | Go to post
No activity results to display
Show More
Working...