Questions tagged as 'java'

1
answer

Send variable from Scriptlet to Servlet

Good evening people from Stack Overflown, I write pq I have a problem and I would like to see if you could help me A teacher sent us an exercise where you should create a shopping cart and by pressing the submit button you should show the res...
asked by 13.04.2018 / 04:06
1
answer

how to validate the length of 2 or more jtextfield in a single method?

I have 2 jtextfield and I want to validate the number of characters they type in them text_root_username = new JTextField(); text_root_username.addKeyListener(this);////// text_root_password = new JPasswordField();...
asked by 16.04.2018 / 02:55
1
answer

Send Json from jQuery to Spring mvc

I want to send a Json with this format { "tarjetas": [ {"nombre":nombre, "id": id, "lista": lista, "idLista": idLista}, {"nombre":nombre, "id": id, "lista": lista, "idLista": idLista} ... ] } I build it like t...
asked by 29.03.2018 / 10:20
1
answer

Abstract classes and Interfaces

I have to make a class hierarchy in which I have 1 - Product 1.1 - Book has Digital Book - Physical Book 1.2 - Clothing has Pantalon - Shirt I am asked to implement the interface Comparable to compare books for its isbn (attri...
asked by 15.04.2018 / 17:42
1
answer

Create interface with ArrayList

I have to solve an exercise in which they ask me to make an interface, the statement is as follows:    Construct an ArrayReals class that declares an attribute of type double   [] and that implements an interface called Statistics. Content   ...
asked by 30.03.2018 / 15:26
1
answer

Calculate the residual of a total deferred value to installments and add it to a jtable?

private void PLAN_DE_PAGO_CREDITO() { int cntCuotas = 14; int totalVrCredito = 1.400.000; DefaultTableModel tableModel = (DefaultTableModel) TB_PLAN_PAGO.getModel(); for (int i = 1; i <= cntCuotas ; i++) { int valorCu...
asked by 30.03.2018 / 08:24
1
answer

How to save pdf

How can I save a .PDF file in / my_folder with the current date as file name? val date = Date() val timeStamp = SimpleDateFormat("dd-MM-yyyy HH:mm:ss", Locale.getDefault()).format(date) val dir = "${Environment.getExternalStorageD...
asked by 31.03.2018 / 18:48
1
answer

Regex Pattern doubt java

I have the following code: public class getTag2Html { public static void main (String[] args) throws IOException { String tag = "<p>"; URL web = new URL("http://www.insalfonscostafreda.cat/web/"); //...
asked by 28.03.2018 / 17:45
1
answer

Error between java - jdbc oralce, resultset null

Currently I have a code that executes a query to a database in oracle which returns about 200,000 results and then I run the resultset to build a csv. The problem I have is that sometimes, some values of a column of the resultset reach nul...
asked by 09.04.2018 / 15:28
1
answer

How to take the last element of a list in java?

I have the following list listNivelesPersona2 = nivelesPersonaService.findNivelesPersonaConsultaHorario(cvePersona); I want to recover the last record of the time of entry and exit, I do the following for (NivelesPersona nivelesPerson...
asked by 09.04.2018 / 18:23