Questions tagged as 'java'

1
answer

Problem in deploying an application in tomcat

I have an application running local, where I did deploy to local tomcat and it works perfectly. I installed the same version of tomcat and the postgres database on another machine, which in this case will be the server, but it is not working, it...
asked by 14.03.2016 / 19:53
1
answer

CPF Field Mask

How can I add a simple input mask? For example, when I type in the CPF, I want to limit the amount of characters I already know, I just want to know how to add those points and bars along the user's typing. Note: I saw some examples here b...
asked by 11.10.2016 / 16:06
2
answers

Assemble a vector with 5 students, in the fifth student this vector multiplies by 2, being able to enter 10 [closed]

private Aluno alunos[]; private int ultimaPosicao; public int tam=5; /** * Construtor */ public VetorDeAlunos(){ alunos = new Aluno[tam]; ultimaPosicao = 0; } /** * Metodo para inserir aluno na lista. Este metodo insere o aluno na ul...
asked by 23.03.2017 / 16:20
1
answer

Smartphones Screen Size [duplicate]

I am producing an application. I would like to know for what size of Android smartphone screens should I program the layout. The layouts I made do not fit on smartphones with screen of 2.7.3.2, 3.3.3.4, inches. Will this be very harmful?     
asked by 06.08.2017 / 02:29
2
answers

How do I keep the last 100 objects inserted in an ArrayList?

How to keep the last 100 objects inserted in an ArrayList? This will be constantly fed but I want to keep only the last 100.     
asked by 19.04.2017 / 15:21
1
answer

Error Java method main is too complex

My code is displaying the following message "method main is too complex" when I use several conditions in if for number repeat analysis. With less data in if it works, but I need all of these comparisons. //Verifica Repetições if ((combinacao[...
asked by 04.10.2018 / 03:47
1
answer

My code only takes the last element of the database

My code only takes the last element of the database, however it lists the correct amount of it and log.i shows that it is catching all. Why does not this work? package br.app.lista; import android.app.Activity; import android.content.I...
asked by 09.11.2017 / 18:11
2
answers

how to install JDK and JRE java on windows 10?

Hello; I'm doing the Android development course. I'm in: Section - 2 - Installation and configuration in windows Lesson 5 - Java, JDK and JRE installation PROBLEM - I am not able to configure the environment variable. *** The JAVA...
asked by 30.10.2017 / 17:30
1
answer

How to convert a String to Integer? [closed]

How do I convert a value of type string that needs to be stored in a variable that is of type int ? Here are some conversion codes which is the most appropriate to use for this conversion? A.a = Integer.valueOf("10") B.a = int.Par...
asked by 19.10.2016 / 01:57
1
answer

How to make my Program access the net? [closed]

I actually want to create a program that tells me that my internet connection has crashed, but I want to create it. I have a little notion in java, poo, but I wanted to know where to start. Do I have to import any tool that accesses the net?...
asked by 24.11.2016 / 18:21