Questions tagged as 'java'

1
answer

Generate registration number

Friends, I am trying to generate an autoincrementable Registration Number with a certain structure ... The first two numbers correspond to the current year that is added 000000 (5 zeros) and that must be autoincrementando for each record that is...
asked by 20.11.2018 / 20:52
2
answers

Carry a SELECT to a NAMED QUERY

I want to do the following SELECT but in a NAMED QUERY , I do not know if it's possible. SELECT DISTINCT (q1.code ||'/'|| q1.name) FROM ( SELECT c.code,c.name FROM USER c ) q1     
asked by 05.08.2016 / 16:53
1
answer

Error connecting socket Andorid java application (Client) with socket application java PC (Server)

Communication between the socket of my java application andorid (client) and my java pc (server) application does not work. I have 2 java applications, one for mobile and another for computer. It is assumed that the andorid application (clien...
asked by 02.11.2018 / 00:36
2
answers

How to evaluate conditionals in JAVA in this exercise?

I have a problem with this exercise. (Attachment enunciated) The owner of a parking lot requires a program that allows him to determine how much you should charge for the use of parking for your customers. The rates that are had are the fol...
asked by 02.11.2018 / 01:15
2
answers

How to recover the id inserted with callablestatement from a storeProcedure in java

good day, I hope and you can help me, what happens is that I want to recover the id inserted when I execute a function in postgresql, but the problem is that it brings a 0 since the sp runs and adds it to the view of the datatable but then I rel...
asked by 01.11.2018 / 19:43
1
answer

Obtain values of a jsp variable in javascript

I was trying 2 ways to get values in a variable jsp in my javascript, but they give me different results FIRST ALTERNATIVE //Con esto obtengo un string con este valor "[1,2,3,4]" <% String permisos= (String)session.getAttribute("permisos...
asked by 10.09.2018 / 19:01
2
answers

How can I disable a jtextfield for ten seconds in java

Hi, could you tell me which is the best way to disable a jtextfield after the user press enter for a certain time like 10 sec Thanks     
asked by 28.08.2018 / 05:34
1
answer

Call the driver in SpringMVC

I need to call my controller directly when the application is started, to paint the html with the data, but I do not know how it is done - > <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>...
asked by 25.10.2018 / 12:23
1
answer

Insert data from an array to another array

Arreglouno = {"Bélgica", "México", "Nicaragua", "Alemania " } // this is the first fix already with data String arreglodos = new String[2]; Int i=0; for (i = 0; i < Arreglouno.length;i++) { if ( i == 1) { arreglodos [0] = [i];...
asked by 25.10.2018 / 06:31
2
answers

Can a Java class be forced to implement a specific property?

Is there any way to force a class to implement a property of a certain type? For example, I have the classes Xxx and Zzz , and I want both of them to be forced to implement the property name of type String .    Edited...
asked by 10.11.2018 / 01:26