No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi, I dont understand why, but for some reason, the system does not recognize the buffered reader in the fileReverse method. Every time I try to invoke the readLine method on aBufferedReader, I get null as a result. Even my file reads: null null null null Can someone please help … |
|
How can I obtain a value from inside a for loop? I declared the variable in the method and not inside the loop. When I use the same variable in an if statement in the same method however, I get a message saying that the variable has not been initialized. … |
|
[CODE]public static boolean rentCar(String id) { for (int i = 0; i < collection.size(); i++) { return( if (id.equals(Car.collection.elementAt(i).carTypeId)) {// if the id equals to the collection.elementAt(i).carTypeId; System.out.println("Please insert the id number of the car you would like to rent>"); id = Keyboard.in.readString(); int quantity; quantity = Car.collection.elementAt(i).carInventory; if (quantity … |