How can I implement a counter in the code below to be able to know how many recursive calls will happen to calculate the MDC of 14 and 18?
package Aula01;
import javax.swing.JOptionPane;
public class Exer01 {
public static double mdc(do...
I need to use regular expressions to find patterns in a text. It would be better for me if there were a method equal to search() of Python, which returns a vector with all occurrences of that pattern. Is there a similar method in Java?
...
Write a program that gives two temperatures in degrees Fahrenheit (integer values) produces a table with all values in that interval half a degree Fahrenheit. For example, running the program for values 30 and 35 should produce the following out...
I can not give a space between EditTexts in my project. the amount of EditTExts is generated according to the amount entered by the user, that is, it has been programmed in the Java Code. : //i.stack.imgur.com/lfOAW.png ">
I need to access a webpage through the WebView component.
1- I can load the page.
2- I can intercept the button event.
I can not insert / inject var name = prompt("Introduza o numero:");
Note: The page is only available...
I have the following text:
Texto|Texto|Texto|
I want to display it in a TextView, but every "|" (pipe) it will break the line.
In this way:
String texto = this.textoQuebrado;
String[] array = texto.split("|");
conteudo.setText(...
Example: The division of 100 (entry value) by 3 (quantity of parcels) is equal to 33.33, where 3 * 33.33 = 99.99.
Being that the right is to stay a parcel with the value 33.34.
Java code
public void parcelar() {
listaParcela = new...
Hello, I want to create a conditional that checks whether all the fields on the screen were informed by the user or not. If anyone has not been informed, I would like to submit a toast showing the error. The problem is that on this screen I have...
I have a very early question about polymorphism / access modifiers in Java.
I would like to find out why a certain phenomenon occurs in my code.
Here is an example of classes:
Class Pai :
public class Pai {
public void metodo1(...
Through JAVA, I need to make a request via POST, where I get a JSON with a token. The JSON return I get after sending the POST is this:
{
"Token": "e27bb0a7-e65b-4cc3-a82e-7a2a3c26a248",
"Codigo": 0
}
How do I make t...