Questions tagged as 'java'

2
answers

Spring Boot x Spring MVC [duplicate]

Is Spring Boot the same as Spring MVC? In practice, do not you use Spring MVC (or, should not you use it) and only Spring Boot?     
asked by 02.06.2017 / 05:21
1
answer

How to modify XML elements with Java?

I've never worked with XML before. I created the following XML configs.xml : <resources> <string name="ip"></string> <string name="username"></string> <string name="password"></string&...
asked by 29.10.2014 / 20:13
2
answers

Play framework problem with form

Introduction I'm starting to develop with the Play Framework. I'm making an ALL list template with it. Problem When I am instantiating my form in the controller it returns me the following error: Would anyone know what the proble...
asked by 07.10.2014 / 14:25
2
answers

Recursive method or loop to populate or list an n-dimensional array

I'm trying to construct a method able to fill an n-dimensional array at all positions, for example: I have a 2-dimensional array, where that array is 2x2 with only 2 dimensions on a Cartesian plane, for example. I would like the same method t...
asked by 13.11.2017 / 02:32
1
answer

How to use Java 8 stream in an Object list []

Imagine the following scenario: A list of Object[] . Something similar to this: List<Object[]> lista = new ArrayList<>(); Object[] dados = new Object[3]; dados[0] = 1; dados[1] = 20; dados[1] = "cristiano"...
asked by 05.09.2017 / 20:47
1
answer

Why do packages start with the br.com prefix in Java? [duplicate]

I often look at internet examples of Java code where your class organization is always contained in packages with prefix br.com.algumPartName. Why is "br.com" used?     
asked by 22.08.2017 / 18:09
1
answer

Adding elements to a List? extends Number

Why can not I add elements to a list of type List<? extends Number> ? For example: public class GenClass{ public static void main(String args[]){ List<? extends Number> ml=new Vector<Integer>(); ml.get(0);...
asked by 25.08.2017 / 20:22
3
answers

Format String for "00:00:00"

I need this string to output in the format 00:00:00 currently it goes out: 5: 4: 1 For example, what I did was do several ifs, but it is not efficient, and it also does not format when the 3 are below 10: long diffSeconds2 = long_hours / 1...
asked by 26.09.2017 / 02:49
2
answers

Spinner together

I have a Spinner that is responsible for States in Brazil. And another Spinner responsible for Capitals in Brazil. I need to select State another Cities spinner to be unlocked and display their respective Capital tha...
asked by 11.01.2017 / 14:49
1
answer

Implement a "counter" of results

I have a search screen / query of records and when I do the query, for example, from all countries, a label "arrow" how many countries found, (eg 19 countries found) . However, if within these results I type a letter to match a country, for...
asked by 13.03.2017 / 21:14