Click here to Skip to main content
15,888,286 members
Home / Discussions / Java
   

Java

 
GeneralRe: Synchronize JSP Pin
lyngocquy10-Jul-13 16:24
lyngocquy10-Jul-13 16:24 
GeneralRe: Synchronize JSP Pin
Zoidberg Why Not10-Jul-13 18:04
professionalZoidberg Why Not10-Jul-13 18:04 
QuestionMessage Closed Pin
9-Jul-13 21:02
realolap9-Jul-13 21:02 
QuestionDeveloping SaaS in Java Pin
Sarmad Hash8-Jul-13 10:19
Sarmad Hash8-Jul-13 10:19 
AnswerRe: Developing SaaS in Java Pin
Richard MacCutchan8-Jul-13 21:25
mveRichard MacCutchan8-Jul-13 21:25 
GeneralRe: Developing SaaS in Java Pin
Sarmad Hash19-Jul-13 9:28
Sarmad Hash19-Jul-13 9:28 
GeneralRe: Developing SaaS in Java Pin
Richard MacCutchan19-Jul-13 21:54
mveRichard MacCutchan19-Jul-13 21:54 
Questionnew to java - NullPointerException error Pin
Suzy McLain7-Jul-13 12:15
Suzy McLain7-Jul-13 12:15 
Hi, I am new to java and am working on a sales tax project. And I can't seem to even get the project tested as it is. Can anyone help me please?

The full error message I get is
java.lang.NullPointerExpection at SaleBad.total(SaleBad.java:42)

and the code line it highlights is in the method below:

C#
/**
 * return the total of the sale including sales tax for the state
 */
public double total()
{
    double sum = 0;
    for (SalesLine s: saleLines) {
    sum = sum + s.price();
}

    if (state.equals( "AL")) sum = sum * 1.07;else
    if (state.equals( "AK")) sum = sum * 1.04; else 



Thank you!

AnswerRe: new to java - NullPointerException error Pin
Bernhard Hiller7-Jul-13 20:46
Bernhard Hiller7-Jul-13 20:46 
AnswerRe: new to java - NullPointerException error Pin
mali_angel17-Jul-13 20:11
mali_angel17-Jul-13 20:11 
QuestionLogin process Always false..cannot find the error Pin
mali_angel3-Jul-13 18:16
mali_angel3-Jul-13 18:16 
AnswerRe: Login process Always false..cannot find the error Pin
Shubhashish_Mandal3-Jul-13 19:53
professionalShubhashish_Mandal3-Jul-13 19:53 
QuestionLogin process Always false..cannot find the error Pin
mali_angel3-Jul-13 17:22
mali_angel3-Jul-13 17:22 
AnswerRe: Login process Always false..cannot find the error Pin
mali_angel3-Jul-13 17:28
mali_angel3-Jul-13 17:28 
AnswerRe: Login process Always false..cannot find the error Pin
Shubhashish_Mandal3-Jul-13 19:40
professionalShubhashish_Mandal3-Jul-13 19:40 
GeneralRe: Login process Always false..cannot find the error Pin
mali_angel3-Jul-13 19:51
mali_angel3-Jul-13 19:51 
GeneralRe: Login process Always false..cannot find the error Pin
Shubhashish_Mandal3-Jul-13 19:54
professionalShubhashish_Mandal3-Jul-13 19:54 
QuestionactionPerformed in another class Pin
chdboy1-Jul-13 19:27
chdboy1-Jul-13 19:27 
SuggestionRe: actionPerformed in another class Pin
Richard MacCutchan1-Jul-13 20:46
mveRichard MacCutchan1-Jul-13 20:46 
AnswerRe: actionPerformed in another class Pin
Shubhashish_Mandal3-Jul-13 19:48
professionalShubhashish_Mandal3-Jul-13 19:48 
Questionwhy java in linux has outstanding performance even jvm slow it down? Pin
crunchor28-Jun-13 17:55
crunchor28-Jun-13 17:55 
AnswerRe: why java in linux has outstanding performance even jvm slow it down? Pin
Richard MacCutchan28-Jun-13 23:19
mveRichard MacCutchan28-Jun-13 23:19 
GeneralRe: why java in linux has outstanding performance even jvm slow it down? Pin
crunchor28-Jun-13 23:22
crunchor28-Jun-13 23:22 
AnswerRe: why java in linux has outstanding performance even jvm slow it down? Pin
NotPolitcallyCorrect29-Jun-13 0:51
NotPolitcallyCorrect29-Jun-13 0:51 
QuestionMessage Closed Pin
27-Jun-13 17:11
crunchor27-Jun-13 17:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.