Questions tagged as 'java'

1
answer

Replace icon in a Jframe [closed]

How do I remove the icon (the coffee cup) in a Java Jframe.     
asked by 21.03.2018 / 17:32
4
answers

Program to know the salary of a person who works overtime

The code to know the salary of a person who is paid overtime, after the 40th hour is paid as follows: ((paymentx hour * worked hours) + paymentxhora / 2 + paymentxhora) I mean that the employee after the 41st hour they pay as normal time plus ha...
asked by 19.03.2018 / 17:36
2
answers

Object Arrangement in Java

Good morning, it turns out that I must make an arrangement that can store both data as int, String, boolean and in turn any other type of object that is entered. I was using the ArrayList since it gives the option to save whatever it is in each...
asked by 07.02.2018 / 13:58
1
answer

inconveniences with the method darPasajeroMasSillasAsignadas ()

Good morning classmates I have some problems with this exercise, I do not have much time in this programming, this is the statement: Statement Create the method given by Passenger Assigned Chairs, which returns the passenger who has more assi...
asked by 06.02.2018 / 00:21
1
answer

Implement Filterable to a Custom BaseAdapter - Android

I have the following custom adapter for a GridView : public class AdapterGrid extends BaseAdapter implements Filterable{ private Context context; private int layout; private List<String> items; public AdapterGrid...
asked by 27.03.2018 / 18:44
2
answers

How can I make several threads draw several JLabel?

My teacher let me do a program where the user is asked for an entry data and according to that data generate "N" agents (threads) and that each agent appears randomly in a window. After they appear, the agents must move randomly either up, down,...
asked by 28.03.2018 / 05:48
1
answer

How to convert the date and time into a text? Android Studio

for example: 03/28/2018 10:57:24 and when registering or updating it is appreciated: "A moment ago", "An hour ago" in the xml     
asked by 28.03.2018 / 15:59
1
answer

When and how to use the Set and Map interfaces?

I am learning to use Set and Map. First I wanted to know if Set and Map are Collections and also interfaces. and that you confirm to me that everything I say is correct. Set and SortedSet are daughters of colecction. Map and SortedMap are daught...
asked by 13.06.2018 / 20:53
2
answers

Reverse string using Streams in Java 8

I would like to reverse the order of a text string using Java Java API Java 8. This is what I have tried, but it does not make the investment. import java.util.Comparator; import java.util.stream.Collectors; import java.util.stream.Stream;...
asked by 20.06.2018 / 01:10
3
answers

Determine the closest number, within the array, to the given number

Good I have this problem: from an array and a number determine which number of the array is closest to the number. I do not get it public static int masCercano(int[] numeros, int num) { int cercano = 0; for (int i = 0; i < numero...
asked by 12.06.2018 / 00:36