Questions tagged as 'java'

2
answers

Fragment of static code

I am translating a Java code to C # and I found this code snippet: static { for (int i = 0; i < 64; i++) TABLE_T[i] = (int) (long) ((1L << 32) * Math.abs(Math.sin(i + 1))); } From what I read, java lets you define stati...
asked by 17.04.2018 / 18:21
2
answers

Error: Requirements check failed for JDK 1.8 or greater

I wanted to launch the commands: ionic build android or ionic run android --device But he always throws me this eror: Error: Requirements check failed for JDK 1.8 or greater The version of java I have is 1.8.0_111, I have the env...
asked by 08.01.2017 / 06:36
1
answer

Pass a java string to uppercase and lowercase

I am making a program that receives a string and returns the same string, interspersed with capital letters, that is, receives hello world (equal capital and lowercase letters) and writes HoLa MuNdO, regardless of the spaces. Now what he does to...
asked by 28.01.2017 / 13:21
2
answers

SQL query to check free rooms with PreparedStatement in Java

I have this query that I pass it to @raintrooper, in this other query that I did How to check if a room is available? : declare @Vfechaentrada date, @Vfechasalida date declare @reservaciones table ( habitacion int, fechaentrada date, fechasa...
asked by 13.12.2017 / 11:28
2
answers

Exercise list of numbers ending in 2 with an unknown fault

I have an exercise that I have been working on and it turns out that, although it gives me all the results I ask, it throws an exception from ArrayOutOfBounds (on out of range indexes). Does anyone see the fault and correct me please? Thank you...
asked by 22.11.2016 / 12:29
5
answers

class rectangle, problem Deitel set and get

They ask me to create a rectangle class with length and width.    8.4 ( Rectangle Class ) Create a class named Rectangle with the length and width attributes, each with a default value of    1 You must have methods to calculate the per...
asked by 18.10.2016 / 04:58
2
answers

Save value of EditText with SharedPreferences and without using a button (Android)

I would like to know if it is possible to store the information of an EditText without having to click on any type of button, that is, at the same time that the user writes can be saved, and be accessible when the application starts again . The...
asked by 07.04.2017 / 19:35
2
answers

Stereotype @autowired vs @inject

When to use @autowired ? Is your goal to inject a class? But for that would not be @inject ? @Autowired private CreateTextMessageService service; In this case the @autowired is being used in a property. But in the...
asked by 15.05.2017 / 06:02
1
answer

Increased memory usage of my program in JAVA SE

I have created a simple program in JAVA SE with NETBEANS where I have 3 buttons and every time I press a button I send information to my database, at all times I have the connection open and every time I press the button //Creo la conexión st...
asked by 27.03.2017 / 11:49
1
answer

Is it possible to create an HTML table using the structure of a JSON?

I'm trying to create a table using a JSON file. What I'm looking for is to create the table based on the structure of the JSON, for example, I have the following JSON: { "Persona":{ "nombre":"Juan", "edad":28, "Residenc...
asked by 21.05.2018 / 03:50