You repeatedly tell me to look at the conditions, hence I am blind to my mistake and it is something incredibly silly and obvious.
I realized that my human logic did not work here.
I want the...
Type: Posts; User: TheoMuffin
You repeatedly tell me to look at the conditions, hence I am blind to my mistake and it is something incredibly silly and obvious.
I realized that my human logic did not work here.
I want the...
I want the do {} while to loop until I get the input I desire. In this case, a symbol '*' which is of length 1.
I want it to exit the loop when I receive the above-mentioned symbol.
I updated the code above. I made a mistake, however it still doesn't do what I wanted.
The program printed out this:
Please indicate the operation:
*****
Symbol is: *****
Operation symbol...
So it's alright to dismiss the System.in method as unneeded or unreliable?
Aside from that.. The renewed version still does funky stuff.
package simpleProgram;
import java.io.IOException;...
I added a println just under the
symbol = (char)System.in.read();
Please indicate the operation:
/
Symbol is: /
Please indicate the operation:
Symbol is:
package simpleProgram;
import java.io.IOException;
public class Calculator
{
public static void main(String[] args)
{
Bump. I will post the full program if that is what it takes to find a solution.
That was my plan, however the Scanner has no sc.readChar();
package calcPackage;
import java.io.IOException;
public class TypeCheck2 extends TypeCheck
{
@SuppressWarnings("static-access")
public boolean CheckInputType(char character)
{
try
I believe I have already supplied the necessary information, but.. this may help clarify:
public static void insertSymbol()
{
TypeCheck2 input = new TypeCheck2();
do
{
Indicate the operation:
-
45
Indicate the operation:
13
Indicate the operation:
10
Indicate the operation:
Hello, I started learning java two days ago and I am well on my way on completing my first calculator.
do
{
System.out.println("Indicate the operation: ");...