Questions tagged as 'java'

2
answers

Find an object inside an ArrayList

I created a Conta class and set its attributes. In another part of the code, I have defined values for your attributes and added it to a ArrayList , now I need to select it and start the value of one of its attributes, but I am not...
asked by 23.03.2017 / 02:12
3
answers

Read line txt and include ";"

I have a txt file whose lines have the following data: 0 02 020 0201 020110 Z DEMONSTRAR COMPETÊNCIAS PESSOAIS 1 Primar pela correção de atitudes This way I can not import the data either to excel or to mysql, since the words do not have th...
asked by 27.01.2017 / 17:58
1
answer

HQL query with list of ENUM as parameter

Hello, I have the following problem, here is an example: I have an entity Banda that has as attribute a list of genres List<Generos> generos , Generos is an ENUM with the following values: ALTERNATIVE_ROCK("Altern...
asked by 31.12.2014 / 03:43
1
answer

Several ImageView inside FrameLayout, an error occurs

Well the problem is the following I have some ImageView that are called by buttons, it works cool, but when defining 4 images it still goes well, I add another ImageView with another image to the error program, in that same Ima...
asked by 01.02.2015 / 22:45
3
answers

Why give new in the class attribute?

I'm moving from C ++ to JAVA and would like to know why to give new already in the class attribute? public class ExemploPES2 { class y{ int value; } class x{ private y nova = new y(); } I do not unders...
asked by 06.07.2017 / 13:50
2
answers

Why do not you have to instantiate the list to not accumulate?

I have the following class: public class TesteLista { public static void main(String[] args) { List<String> dados; Teste1 t = new Teste1(); dados = t.getList(); System.out.println(dados); } } Class that has method...
asked by 26.09.2017 / 20:12
2
answers

Matrix multiplication in Java

I need to make two arrays multiply, but I'm wrong at the time of multiplication. int ma[][] = new int [3][2]; int mb[][] = new int [2][2]; int mab[][] = new int [3][2]; for (int i = 0; i < ma.length; i++) { for (int...
asked by 26.10.2017 / 12:47
2
answers

Eclipse creating getter with prefix is

I created the methods using the Eclipse Getters and Setters command, but when I created the getter of the status Boolean attribute, it was automatically created as isStatus . Should not be created as getStatus ? Could anyon...
asked by 27.09.2017 / 03:54
1
answer

ui: include with JSF rendered does not work actions

I have two ui:include inside a template, follow the example below: /*Desse Jeito ele entra nos metodo corretamente!*/ <ui:include src="../home/dados.xhtml"></ui:include> /* com rendered não entra no metodo */ <h:panelGro...
asked by 23.11.2015 / 02:58
2
answers

Compile error: The literal ... of type int is out of range

CadastroDePessoasFisicas c2 = new CadastroDePessoasFisicas("636.363.635"); System.out.println(c2.getNumero()); System.out.println(c2.getNumeroValidador()); System.out.println(c.cpfIsValid(63636363555)); System.out.println("\n"...
asked by 13.05.2018 / 23:33