Questions tagged as 'java'

1
answer

Variable value passing from one method to another method in Java

The project is about a school GED, where there is the main class that connects to the database and there is another class to generate PDF files. The point is that the system even extracts the desired data from the database, but can not insert...
asked by 09.04.2018 / 18:32
1
answer

String replace is not performing exchange

I can not change the character of my string with the value of the map, if they are equal: key and character. import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class Mapa { public static Map<Character,...
asked by 14.04.2018 / 19:36
1
answer

Z-shaped square with array

I'm trying to make a java algorithm to display a string of letters arranged in a "Z" format. If the alphabet finishes, go back to A and continue until you finish the matrix. I'm really lost in relation to the matrix. Could someone help? An ex...
asked by 10.04.2018 / 02:34
0
answers

Error server memory wildfly

I tried to import a 66 megabyte file, and gave this error in wildfly : Caused by: java.lang.OutOfMemoryError: Java heap space In addition to including this setting in spring.    @Bean public MultipartResolver multipartResolver () {     C...
asked by 11.04.2018 / 13:22
1
answer

Return data obtained from OnResponse

How do I return this String reponse? If I give the return there it does not accept ... and if and by at the end of the method and using an auxiliary variable it risks returning null. public String getData(){ StringRequest request = new Str...
asked by 20.10.2016 / 01:41
1
answer

403: Access is denied / Spring security

I'm having trouble working with the Spring Secutiry. When I add this line below, I get status 403 when I try to access the url. @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) public class WebSecurityConfig extends WebSec...
asked by 05.04.2018 / 18:10
1
answer

Pick images from drawable folder by name

I would like to know how to get the id of an image from the drawable folder and use it in an ImageView. I'm trying to do this inside a ListView String nomeImgFilme = filme.getImagem(); int imgID = convertView.getResources().getIdentifier(nomeI...
asked by 08.04.2018 / 15:16
1
answer

DexArchiveBuilderException with Guava 21.0

I just received an exception when I was updating versions of frameworks and running an application that had been standing still for a long time. My dependencies are these: dependencies { compile fileTree(dir: 'libs', include: ['*.jar'])...
asked by 04.04.2018 / 17:26
0
answers

Pass Mock in parameter

I need to set a class, and put a face on it called "SimulationDeSet", and make the "SimulationDeSet" return the value I want, but when trying to pass this mock as a parameter it is wrong, I saw many ways to do mock but that's how I need it in th...
asked by 03.04.2018 / 21:25
2
answers

While inside another While in Java

I'm trying to do a while within another while and after running the code within the second while I wonder if I want to continue or not, if so, the program should loop the first while. It turns out that the loop is only going to the second while...
asked by 03.04.2018 / 05:47