Questions tagged as 'java'

1
answer

What are the dependencies I need in Gradle? [closed]

What are the dependencies required for the following libraries? import java.io.StringReader; import java.net.Authenticator; import java.net.PasswordAuthentication; import java.util.ArrayList; import java.util.List; import javax.xml.parsers.Do...
asked by 31.01.2018 / 22:23
1
answer

Error creating sparrow up menu in cardview

I'm creating an application that uses cardview in my list. And I'm having trouble adding the menu in the cardview, as shown below: Mycardviewclass:classCustomAdapterextendsBaseAdapter{privateList<Palheta>palhetas;publicCustomAdapter(List&...
asked by 12.01.2018 / 21:27
1
answer

Error @Path and @Produces in Java

Error using @Path in Java. package resource; import java.util.ArrayList; import java.util.List; import java.nio.file.Path; import java.nio.file.Paths; import domain.Album; import domain.Banda; import domain.Musica; import jdk.nashorn....
asked by 10.01.2018 / 20:21
1
answer

Problems with hashmap getordefault in java

I have a hashmap problem in JAVA. I'm trying to create a program that reads data from a car, save those cars in an ArrayList, and organize by the manufacturer (that would be the key) the cars of your brand. public static void main(String[]...
asked by 27.09.2017 / 22:17
2
answers

Use of the "Instance of"

public class AlunoLicenciatura extends Aluno{ private String curso; private ArrayList<Disciplina> l_dis; public AlunoLicenciatura(String curso,Aluno a){ super(a.getNumero(),a.getNome());//recebe o numero e o nome de al...
asked by 26.11.2017 / 22:47
1
answer

Appear 1.0k instead of number 1000 and so on

How can I make it appear instead of 1000 to appear 1.0k, and so on? 1000 - 1,0k 2000 - 2,0k 10000 - 10,0k 100000 - 100,0k and etc ... @Override public double getValor(String arg0) { Pessoa pessoa = Main.getPessoa(); do...
asked by 29.11.2017 / 23:36
1
answer

Error: "Can not find symbol" - Class Instance within the Main Class, using Linux terminal

I have an exercise to solve, which is to create a simple Java language calculator. I have to through the Terminal, send the two numbers as arguments to my program. I am using the following build command: zeluis@zeluis-HP-EliteBook-8460p ~/...
asked by 17.11.2017 / 23:34
1
answer

Error writing and reading file in CSV

I have the following problem writing a CSV file. The file looks like this:    NULL My File class import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; im...
asked by 17.11.2017 / 13:56
1
answer

Activate button event when giving enter in an edit

I created a "register" screen where the user informs the name / surname and where there is a Continue button that goes to another screen. I would like this new screen to open when the user hit Enter, but I do not know how to make the Enter key h...
asked by 26.10.2017 / 04:48
1
answer

DataSource PostgreSQL Widlfly

I'm trying to set a DataSource with PostgreSQL , but it's throwing this Exception 23:36:46,381 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) WFLYCTL0013: Operation ("deploy") failed -...
asked by 25.10.2017 / 04:48