Hey still learning myself but the four basic methods you need are
public int add(int num1, int num2)
return num1 + num2;
public int subtract(int num1, int num2)
return num1 - num2;
public int multiply(int num1, int num2)
return num1 * num2;
public int divide(int num1, int num2)
return num1 / num2;
now, actually, that's not as much a problem.
there are several ways you can do this.
the first is to use + - * / = as separators, and use the indexOf and substring method of string objects to get the numerical values.
an other way is to, char by char, extract the contents of the string and make a check eacht time whether or not the char is one of the separators.
what have you done yourself so far? it's better to try and fail, than to copy paste.
Very much thanks.....
I also believe better to try and fail than to copy paste but actually
am beginner in java(specially in such type of problems )..So please sir elaborate little bit more so that i could try and apply the concept myself..
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...