User Profile

Collapse

Profile Sidebar

Collapse
Cleo Millet
Cleo Millet
Last Activity: Nov 24 '11, 04:16 AM
Joined: Oct 4 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Checking for a FileNotFoundException in a Seperate Method

    This is just a simple program to check if a file exists or not, with the user input and the results 'File exits'/'File does not exist' all in the main method and the actual Exception catching being done in a separate method. I've got the basics of the doesFileExist method to catch any exceptions, but I can't figure out how to return that information to the main method so I can inform the user of the results.

    Code:
    import java.io.FileNotFoundException;
    ...
    See more | Go to post

  • How do you validate a String to make the program continue or not?

    I'm not sure if this should be in two separate posts or not. So, I apologize ahead of time if this is the case. However, since I'm trying to do one thing here with two conflicting methods, I thought it should go together.

    I'm trying to have a simple 'Do you want to continue?' question at the end of a program. However, I want to validate that information so there are no mistakes. I know there are a TON of ways of doing it - I've...
    See more | Go to post

  • In a Select Statement, how do you create a temporary column to display calc results?

    I know there is a way to create a temporary column as part of a basic Select Statement search that shows the result of mathematical calculations done in that search, but I can't remember the syntax and googling it has been a wash out.

    I have a list of classes in a database. I need to list all classes with less than 12 students in them, that's fine. But I also need add a column that shows the number of students necessary to bring...
    See more | Go to post

  • Cleo Millet
    started a topic How to use SET to Update a Pre-exiting Table

    How to use SET to Update a Pre-exiting Table

    I'm still fairly new to MySQL and I've been given a task by my lecturer that I just can't make work. She wants us to use SET to add a row to a table instead of the regular VALUE method. Here's my code and the error I received:

    Code:
    mysql> INSERT INTO Instructors
    -> SET FacId = 96
    -> SET FirstName = 'Chris'
    -> SET LastName = 'Explorer'
    -> SET HomePhone = '555-1492';
    
    ERROR 1064 (42000):
    ...
    See more | Go to post

  • Ah, thanks. That did it....
    See more | Go to post

    Leave a comment:


  • I'm afraid I don't understand you answer. Add 1 to what and where?
    See more | Go to post

    Leave a comment:


  • How to get a random between 1 - 100 from randDouble?

    Hello,

    Okay, I'm still fairly new to Java. We've been given an assisgnment to create a game where you have to guess a random integer that the computer had generated. The problem is that our lecturer is insisting that we use:

    double randNumber = Math.random();

    And then translate that into an random integer that accepts 1 - 100 inclusive. I'm a bit at a loss. What I have so far is this:

    ...
    See more | Go to post
No activity results to display
Show More
Working...