Click here to Skip to main content
15,845,785 members
Home / Discussions / Java
   

Java

 
GeneralRe: IS anybody knows how to convert HTML to XML file USING java Pin
Richard MacCutchan5-Nov-17 23:09
mveRichard MacCutchan5-Nov-17 23:09 
GeneralRe: IS anybody knows how to convert HTML to XML file USING java Pin
Raaz db Bengalore5-Nov-17 23:19
Raaz db Bengalore5-Nov-17 23:19 
QuestionHi all can anyone solve this for me plz in java Pin
Jbdomnic12321-Oct-17 5:28
Jbdomnic12321-Oct-17 5:28 
AnswerRe: Hi all can anyone solve this for me plz in java Pin
Sascha Lefèvre21-Oct-17 5:40
professionalSascha Lefèvre21-Oct-17 5:40 
AnswerRe: Hi all can anyone solve this for me plz in java Pin
jschell23-Oct-17 8:36
jschell23-Oct-17 8:36 
QuestionCalculator App for order of operations (Android Studio) Pin
Member 1347677620-Oct-17 18:40
Member 1347677620-Oct-17 18:40 
AnswerRe: Calculator App for order of operations (Android Studio) Pin
Richard MacCutchan20-Oct-17 22:54
mveRichard MacCutchan20-Oct-17 22:54 
AnswerRe: Calculator App for order of operations (Android Studio) Pin
jschell23-Oct-17 8:58
jschell23-Oct-17 8:58 
Member 13476776 wrote:
Currently, if you enter 2+2*6, it'll only do 2*6


I don't believe that the code you posted does that.

Member 13476776 wrote:
displaytext= displaytext.substring(0,displaytext.length()-1);


The code you posted never sets displaytext. So it will always be empty. You should have been getting the value from 'display' (presumably.)

Member 13476776 wrote:
list.add(operators.nextToken());


You never clear 'list'. That is going to be a problem. I doubt that 'list' should even exist anywhere except the method that parses the result.

You never clear 'result'

Your algorithm is incorrect. It does the following
1. Start = 2+2*6
2. Parse multiplication/division: result += '2*6'
3. Parse addition/subtraction: result += '2+2'

That would leave result=16 (should be 14).
QuestionTrying to develop an app at school using java-mobile app Pin
Member 1347677620-Oct-17 18:03
Member 1347677620-Oct-17 18:03 
QuestionRe: Trying to develop an app at school using java-mobile app Pin
Richard MacCutchan20-Oct-17 22:50
mveRichard MacCutchan20-Oct-17 22:50 
QuestionAnalyze the structure of a class (with package dependence) Pin
Hager.Harald14-Oct-17 13:25
professionalHager.Harald14-Oct-17 13:25 
AnswerRe: Analyze the structure of a class (with package dependence) Pin
Richard MacCutchan14-Oct-17 21:55
mveRichard MacCutchan14-Oct-17 21:55 
AnswerRe: Analyze the structure of a class (with package dependence) Pin
jschell15-Oct-17 9:07
jschell15-Oct-17 9:07 
GeneralRe: Analyze the structure of a class (with package dependence) Pin
Hager.Harald15-Oct-17 22:18
professionalHager.Harald15-Oct-17 22:18 
QuestionJava compile time Errors Pin
Pruthivi_Dev7-Oct-17 4:34
Pruthivi_Dev7-Oct-17 4:34 
AnswerRe: Java compile time Errors Pin
Richard Deeming9-Oct-17 9:33
mveRichard Deeming9-Oct-17 9:33 
AnswerRe: Java compile time Errors Pin
Manish K. Agarwal12-Oct-17 5:37
Manish K. Agarwal12-Oct-17 5:37 
QuestionJava1 Pin
zakarie mukhtar abdi6-Oct-17 10:42
zakarie mukhtar abdi6-Oct-17 10:42 
AnswerRe: Java1 Pin
Richard MacCutchan6-Oct-17 23:12
mveRichard MacCutchan6-Oct-17 23:12 
QuestionBasic Java Help Pin
Gametron134-Oct-17 16:59
Gametron134-Oct-17 16:59 
AnswerRe: Basic Java Help Pin
Richard MacCutchan4-Oct-17 23:40
mveRichard MacCutchan4-Oct-17 23:40 
AnswerRe: Basic Java Help Pin
jschell13-Oct-17 7:05
jschell13-Oct-17 7:05 
QuestionHashMap Internal working. and which scenario use in project in java. Pin
Member 1343768729-Sep-17 11:53
Member 1343768729-Sep-17 11:53 
AnswerRe: HashMap Internal working. and which scenario use in project in java. Pin
jschell2-Oct-17 12:39
jschell2-Oct-17 12:39 
AnswerRe: HashMap Internal working. and which scenario use in project in java. Pin
Richard MacCutchan2-Oct-17 22:49
mveRichard MacCutchan2-Oct-17 22:49 

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.