hi what basically is that we can compare one string with another to see that they are the same example
String n1 = "hola";
String n2 = "hola";
we could use:
n1.equals(n2)
but my case is that I am doing an exercise of triploid words whi...
Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given
Object as a Date
at java.text.DateFormat.format(Unknown Source)
at java.text.Format.format(Unknown Source)
at examen.rutina.RutinaArchivos.obtenerNombreZip(...
I am trying to compile the program to know if it is even or odd and I get an error "Resource leak: input never close", where it is recommended to close the Scanner?
package pares;
import java.util.Scanner;
public class Pares {
public stati...
What is the optimal way to pass a String to Double ?
Taking into account if the string is null is equivalent to 0.0 and if there is no number to convert also 0.0
0.125 > 0.125
a3.72b > 3,72
abcde...
I am consuming a web service that returns a list of objects, the list contains 10 objects and each object contains 5 attributes nombre , placa , sexo , direccion , fecha .
What I need to know is how to reccre the...
Often when I'm clicking code the Android Studio warns me that such a function can return @nullable, its recommendations are two:
Enclose everything in an if you check if the object, variable, function is null or use the statement asser...
Hello, I would like to know what is the best way to run batch files with java, the ways in which I think it can be done is doing everything from java. For example, I have to execute certain commands via ssh I think I could connect from java and...
you want to separate a Double value for example
Double entrada = 34.567
and process it so that the result is:
Parte entera: 34
Parte decimal: 567
but that the value after the decimal point leaves without the 0. (nu...
I have managed to advance a little, I have put the instructions of income but the instructions of calculation I can not do them :(
Help please
/*
“El náufrago satisfecho” ofrece hamburguesas sencillas (S), dobles (D) y
triples (T),
las cuales...
I need to get the date (in particular the year) from the database to integrate it into Java
String now = "SELECT DATE_FORMAT(NOW( ), '%Y' )";
try {
java.sql.Statement sp=cn.createStatement();
ResultSet RS = sp.exe...