Questions tagged as 'java'

1
answer

Search bank using JSF

I'm programming an application in JSF, my application manages to do Record and Change with no problem, however as I'm using Java web technology I'm now finding it rather difficult to perform a search and bring the data to a DataTable , would any...
asked by 30.09.2014 / 12:23
1
answer

How to access data from a Hashmap in another class

How can I access data from a Hashmap in another class? Example: Class1: Hashmap<String,String> teste = new Hashmap<>(); teste.put("TESTE", "exemplo"); Class2: How can I get access to Hashmap test? When...
asked by 13.10.2014 / 13:59
1
answer

How to check if a file already exists and overwrite it in Java?

Hello. I am developing a system where in a certain situation, I must save a file with an extension of figures created by me. If the file already exists, I check with the user if he wants to overwrite the existing file. How should I proceed? Than...
asked by 15.05.2015 / 04:32
1
answer

Randomization in Memory Game

How can I work on this code below so that instead of numbers appearing on the buttons appear images? package memory; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Frame;...
asked by 26.05.2015 / 22:25
3
answers

How to install Android Studio in Linux distributions?

I am new as a linux user, and I installed jdk 7 using this procedure below; http://www.edivaldobrito.com.br/como-instalar-o-oracle-java/ Then I used this procedure to install android as shown below; http://www.edivaldobrito.com.br/...
asked by 01.08.2014 / 01:01
1
answer

Manage button back between fragments

I'm working on an application for college in which I'm using fragments for all my screens for reuse issues. The problem is that I can not control the behavior of the back button between fragments. Within a fragment, I call another fragment, b...
asked by 22.05.2014 / 19:28
2
answers

Cursor positioning problem

LogCat is experiencing a problem with NullPointerException , but I can not identify it. In my point of view, that's right. I know that there is a problem in lines 34 and 39 of ContactRegister that lead to condition if(moveToFirst...
asked by 24.03.2014 / 15:47
1
answer

How to stop a service?

I created a VPN connection in my app through a service, at the click of a button, the connection is made. But now I want to know how to do the reverse, ie by clicking the disable this connection button. How can I do this? Procedure to call th...
asked by 23.11.2018 / 22:21
1
answer

Doubts about class composition or inheritance

I have some doubts in this composition between ClienteJuridico and PhysicalClient with NotaFiscal . I did a search and I saw that I could instantiate the objetos of these classes inside another, in this case it would be the c...
asked by 25.11.2018 / 20:18
1
answer

Function for Java

I have the following code: public class Programa{ public static void main(String args[]){ int a = 10; for (int i = 1; i<=2; i++){ for(int j=0; j<=2; j++){ if((i%2 == 0) && (j % 2 ==...
asked by 08.04.2015 / 02:33