Questions tagged as 'java'

1
answer

Sort numeric vector without using Bubble sort

We usually learn in college that to sort entire vectors, we use a technique called bubble sort : int[] vetorOrdenado = new int[8]; vetorOrdenado[0] = 2; vetorOrdenado[1] = 41; vetorOrdenado[2] = 12; vetorOrdenado[3] = 6;...
asked by 27.01.2016 / 02:20
1
answer

ArrayIndexOutOfBoundsException in Java 8 Parameters Reflection

I was doing a code with reflection in Java 8 when I came across a strange behavior - an ArrayIndexOutOfBoundsException unexpected. Based on this, I've decided to create a minimal, complete, and verifiable example. First look at this co...
asked by 18.03.2015 / 15:21
3
answers

What are asynchronous processing and synchronous processing?

I'm having this doubt while I'm studying about the Handler class. In the book says that when a Thread is being used to perform some asynchronous processing and needs to update the graphical interface of the screen, it is required to use a...
asked by 05.09.2016 / 21:52
3
answers

Ionic is indicated for which types of applications?

Is the Ionic Framework indicated for which types of applications? I've been doing some research on cordova plugins, it seems to give a lot of trouble in multiplatform development, some plugins do not work well for iOS and Windows Phone ? T...
asked by 16.09.2016 / 18:47
2
answers

Recurring Doubt

I did table test but the result will never give 0 because it subtracts 1 from n but then it adds the result with n . The result of this question was 36 and I did not understand why. public class Recursivo{...
asked by 03.02.2016 / 17:58
2
answers

Why can this happen in a foreach?

I built two simple classes: import java.util.ArrayList; import java.util.List; public class Aluna { String nome; String idade; String cpf; List<Aluna> listar(){ ArrayList<Aluna> aluns = new ArrayList<>(); Aluna...
asked by 14.02.2016 / 17:34
3
answers

Why was the parameterized class attribute T not instantiated?

I have this class that implements the IDAO interface package DAO; import java.util.ArrayList; public class BdApp<T> implements IDAO<T> { ArrayList<T> lst = new ArrayList<T>(); //ArrayList<Administrador> lstAdm...
asked by 11.02.2016 / 00:31
1
answer

How to guarantee transactional atomicity in more than one concurrent Thread in a Java SE environment using the Spring framework?

A Java SE solution, using the Spring framework, is being developed to parallelize the execution of a Stored Procedure in Oracle 9i, which takes as parameter one or more rows from a giant file to be processed. This will be done through a Threa...
asked by 17.04.2014 / 18:14
2
answers

Why does Value in Spring MVC require an asterisk?

Why do I need to put * in value when there is nothing left? I mean, before using Spring MVC it worked without problems only as /planilha/ . getPlanilha works correctly but if it has the same RequestMethod and con...
asked by 31.03.2015 / 15:23
2
answers

Web application running in background

I'm working on a Java web application, and I'm creating and planning some specs. In some specific modules I need some executions running in the background on the server. For example, the user sends a file to the server with a request for proc...
asked by 15.08.2014 / 21:31