Search:

Type: Posts; User: miss confused

Search: Search took 0.33 seconds.

  1. Replies
    2
    Views
    443

    Question: counting

    Is there a way to write a code that counts every letter, space, characters with the exception of 0-9 and with an exception of not stating what every characters, space, and letter is?

    i.e. If I...
  2. [Solved] Basic Java File I/O with Scanner Class Problem

    If the equation is this:


    String name;
    Scanner inputFile = new Scanner(new FileReader("dogNames.txt"));
    PrintWriter outputFile = new PrintWriter("doggoneData.txt");

    insert code here
  3. Replies
    4
    Views
    692

    Re: How would I alter my code?

    I tried that before, I don't know why that didn't work.
  4. Replies
    4
    Views
    692

    How would I alter my code?

    If my code:


    public void sortArray () {
    int beginP = 0;
    int endP = myArray.length-1;
    while(beginP<endP){
    if((myArray[beginP]!=GREEN) && (myArray[endP]!=BLUE)){
    swap(beginP, endP);
    }
  5. Replies
    14
    Views
    1,830

    Re: Flaw in my code

    Oh. I got it. Thanks!
  6. Replies
    9
    Views
    3,011

    Re: Looping Question

    for(int i=1; i<=n; i++){
    prints out n amount of


    for(int i=1; i<=n; i+=3){
    prints out until n


    for(int i=1; i<=n; i++){
    System.out.println(i);
  7. Replies
    14
    Views
    1,830

    Re: Flaw in my code

    Feedback:
    The constructor you have written doesn't match the constructor call in the problem specification.

    Output was not:
    My car traveled 400.48 miles on 21.4 gallons of gasoline.
    My mileage...
  8. Replies
    14
    Views
    1,830

    Re: Flaw in my code

    What's wrong with this?



    private double distance;
    private int fuel;

    public AutoTrip(double miles, int gallons){
    distance = miles;
    fuel = gallons;
  9. Replies
    9
    Views
    3,011

    Re: Looping Question

    I'm being asked to print out in lets just say upByThree(4) four of the numbers in the following sequence of my code. With my code, I can either write that code up to a certain number or have it less...
  10. Replies
    9
    Views
    3,011

    Looping Question

    Consider the sequence 1, 4, 7, 10, 13. The sequence starts at 1, and adds 3 to get the next value. Write a method called upByThrees, which prints the first n numbers in this sequence in a column.
    ...
  11. Replies
    14
    Views
    1,830

    Re: Flaw in my code

    Oh sorry, I forgot to put it in brackets code.
  12. Replies
    14
    Views
    1,830

    Flaw in my code

    Main Method:

    public class Driver
    {
    public static void main(String[] args)
    {
    double distance = 400.48;
    double fuel = 21.4;
    AutoTrip myTrip = new AutoTrip(distance, fuel);
    ...
  13. Replies
    6
    Views
    3,193

    Re: simple java help needed

    Took a few tries, but I finally got it. Thanks!
  14. Replies
    6
    Views
    3,193

    Re: simple java help needed

    Those are specific questions.

    for example,

    for number two I have, but it's wrong:
    public char doubleWord(String x)
    {
    x="boo";
    x=x+x;
    Return(x);
  15. Replies
    6
    Views
    3,193

    simple java help needed

    I've tried these equations but my solutions always come out wrong. I feel like I'm just making simple mistakes, such as using void instead of double, but I just don't know.

    #1: Write a public...
Results 1 to 15 of 15