Ask your own question, for FREE!
Computer Science 21 Online
OpenStudy (inkyvoyd):

Brother Hamburger, Hai. I'm curious? @Agent47

OpenStudy (agent47):

package com.Agent.calculator; import java.lang.Double; public class Calculator { public static void main(String[] args) { String myString = "2+1"; char charNum1 = myString.charAt(0); char charNum2 = myString.charAt(2); String firstNumStr = String.valueOf(charNum1); String secondNumStr = String.valueOf(charNum2); double firstNum = Double.parseDouble(firstNumStr); double secondNum = Double.parseDouble(secondNumStr); char operation = myString.charAt(1); System.out.println(firstNum); System.out.println(secondNum); System.out.println(operation); } }

OpenStudy (agent47):

and that's just to freaking parse a string into a double.. i dont even want to go into parsing "+" as the + operation

OpenStudy (inkyvoyd):

ok

OpenStudy (anonymous):

What?

OpenStudy (adrynicoleb):

Hamburgers, yum. KITTEN

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!