Questions tagged as 'java'

1
answer

How do I configure the back button action on android?

How do certain activities in the app perform when the back button is heard?     
asked by 11.04.2015 / 21:12
2
answers

Problems deleting repeated numbers in an ArrayListString

I'm having trouble extracting repeated numbers from a ArrayList , here's the snippet of code: for( int i = 0 ; i < houses.size(); i++ ) { for( int j = 1; j < houses.size(); j++ ) { if(houses.get(i).equals(houses.get(j...
asked by 29.01.2016 / 19:51
2
answers

Count row in matrix that has repeated numbers

I would like to add the number of lines to linhaPreta with only 0, and the linhaBranca with only 1. public class Pixel { public static void main(String[] args) { int[][] img = { { 1, 1, 1, 1, 1, 1, 1, 1 },...
asked by 11.12.2014 / 18:43
1
answer

How to select only one radio button?

In Java swing, a user can select more than one radio button simultaneously, so that it does not happen, one can do: private void radio1ActionPerformed(java.awt.event.ActionEvent evt) { if (radio1.isSeleced()) { radio2.isSelected(fa...
asked by 11.10.2014 / 18:02
2
answers

What is and what is the reserved word "strictfp" for?

I'm not aware of this keyword, I've never seen an example code used. Until I discovered her existence today when reading some books on Java, however it was not clear what the utility. What is strictfp ? What is it for? When to use?     
asked by 29.12.2014 / 22:14
2
answers

How to make the program recognize 'x' as multiplication? [duplicate]

You can treat x like *, because the user will type x to multiply in a number, would you like the program to recognize x as a multiplication via code? example double b = 5 x 5;     
asked by 03.03.2015 / 13:20
2
answers

What does the dereferenced compilation error in Java mean?

In a test code (in Java), the purpose of which was to convert a string to another string by intersecting the letters between uppercase and lowercase letters, I received the error a follow at compile time:    error: char can not be derefer...
asked by 28.12.2014 / 21:51
3
answers

Multiple JDK / JRE

Can I have multiple JDK / JRE installations? because I have two different softwares being one that depends exclusively on the 32bit version (aptana studio 3) and I am already using the 64bit version in eclipse.     
asked by 27.03.2015 / 13:24
2
answers

Doubts about using the Java 8 stream

I'm practicing some new things that came with Java 8 and among those using Stream. I have heard in a place that when we do some action in a list using the stream, it does not change the value of the original list, for example: List<String&g...
asked by 03.06.2015 / 13:57
2
answers

How to subtract hours in java?

I'm trying to make the difference in hours in my application. The case is as follows: Based on the current current time and current minute , I want to compare another time I have in a string and I need to know how many hours and how many minute...
asked by 02.09.2017 / 18:16