Posts by Weriky Alphazero • 37 points
12 posts
-
0
votes1
answer37
viewsQ: Doubt with JAVA regular expression
Hello, I have a question about the following case. I’ll give you an example code of how mine is String texto = "111 aaa"; String reg = "\\d+"; Pattern p = Pattern.compile(reg); Matcher m =…
javaasked Weriky Alphazero 37 -
0
votes2
answers175
viewsA: Setters in an array
For those with the same doubt as me, the solution is very simple. Imagine you create a private 3-space name array; private String[] name = new String[3]; Now you want to access it in another class…
-
-1
votes2
answers175
viewsQ: Setters in an array
I have a array of private integers separated into one class (Obs.: I did so to train the use of the get and of set) and another class that must set values at the addresses of array. This is a…
-
-5
votes1
answer77
viewsQ: Java error method main is Too Complex
My code is displaying the following message "method main is Too Complex" when I use several conditions in if to analyze repetition of numbers. With less data in if it works, but I need all these…
javaasked Weriky Alphazero 37 -
5
votes2
answers439
viewsQ: Java financial math equation
How can I encode this equation in Java? 750=(1-(1+j)^(-10))/j*86…
javaasked Weriky Alphazero 37 -
6
votes2
answers348
viewsQ: Root with Bigdecimal
I’m racking my brain to turn a root into a code. I know it works kind of like this: Math.pow(625, (1.0/4)) = raiz 4ª de 625 = 5 My headache is that my dice are BigDecimals Sting prazoIn =…
-
0
votes1
answer560
viewsQ: Bigdecimal - Numberformatexception Error
If an editText is not filled in the APK stops working and returns the error: 10-31 15:06:54.340 4152-4152/com.wms.www.calccred E/AndroidRuntime: FATAL EXCEPTION: main Process: com.wms.www.calccred,…
-
0
votes0
answers53
viewsQ: Works in Netbeans but not in Android Studio
The following code works for when the user leaves an editText of the form blank. The code worked in Netbeans but on Androidstudio when running the APK with a blank field it shows the message that…
-
0
votes1
answer208
viewsQ: Bigdecimal takes the value of a string
I have the following question, how to accomplish the sum of a BigDecimal with a String. String a = "8"; BigDecimal b = new BigDecimal(2); It would look something like this? b.add(a); Note: I need…
javaasked Weriky Alphazero 37 -
0
votes1
answer103
viewsQ: Miscalculation
Hello, I am with a project of a consortium calculator that is showing error. It receives from the user the following data: Value of the consortium Amount of months % from the reserve fund % of the…
javaasked Weriky Alphazero 37 -
-1
votes3
answers692
viewsA: Financial calculation with decimal large numbers
Thank you all, as I had run out of net I tried to solve the problem myself and I managed in a simple way. I fixed the logic of my code. Your answers taught me to understand Bigdecimal, thank you…
javaanswered Weriky Alphazero 37 -
1
votes3
answers692
viewsQ: Financial calculation with decimal large numbers
I had created the code below for financing calculation. I converted mathematics to Java code, I used variables of the type double. But the result was Infinity, I’m trying to use the BigDecimal, I am…
javaasked Weriky Alphazero 37