The String class has a method called lastIndexOf. Try and see if that makes your parsing easier. :)
Type: Posts; User: xhunter
The String class has a method called lastIndexOf. Try and see if that makes your parsing easier. :)
You should start by creating a class called Employee. :) Try googling first to see what a constructor is and how it can be used to initialize your variables. Your test class is relatively simple....
Try reviewing your code to see what it's doing. For example, this method populates the entire array with the same Animal class. You'll need to write a few more lines of code to get the first index in...
package Account;
// Inputting and outputting floating-point numbers with Account objects.
import java.util.Scanner;
public class AccountTest {
public static void main(String args[]) {...
Wouldn't it be enough to prompt the user that they're making either a deposit or a withdrawal? For example:
1. Prompt to deposit to Account 1
2. Prompt to deposit to Account 2
3. Prompt to...
The error was caused by spaces in my workspace location. I moved my workspace from C:\Documents and Settings\...\workspace to C:\workspace and the index.jsp location is now working fine. But now,...
public void debit(double amount) {
if (_balance < 0 || _balance < amount)
System.out.println("Amount withdrawn is greater than current balance");
else
_balance -= amount;
}
You...
Thanks for the quick reply. Yes, I'm getting a 404 response, and yes, I've just tried your URL and the same thing happens. I'm just wondering why accessing the servlet works but not the JSP.
Hi, I'm trying to create a web application with a servlet but I couldn't get it to load to index.jsp. Can anyone tell me what I'm doing wrong? I'm pretty sure I already have the correct directory...