Questions tagged as 'java'

1
answer

Put a number to a string of java characters

I am trying to make a program that assigns to each letter of the alphabet a number, all correlative, that is to say = 1, b = 2, c = 3 ... always in lowercase letters and without the ñ. For abcd the output would be 10, or for adef output 16....
asked by 24.01.2017 / 09:14
1
answer

Problems with "Pluviometer" Hashmap, List ... java.lang.StackOverflowError

I am very fish in this subject and it is not resolved. I get the following error: Exception in thread "main" java.lang.StackOverflowError at Pluviometro.<init>(Pluviometro.java:11) Program: public interface Meses { public s...
asked by 23.11.2016 / 22:16
1
answer

Extends Service and Implements Activity in the same class || Android

I'm trying to make an Android app that hides both the notification bar and the action bar (back to the start, etc), so I had thought about creating a service that hides the action bar because the notification bar does not I have a problem but wh...
asked by 25.01.2017 / 14:41
2
answers

Problem output on screen with toString

Hello very good I have a main that calls a method to show the content of an object on the screen, the main is this: class Main { /** * main method * @param args arguments */ public stati...
asked by 27.11.2016 / 13:59
4
answers

Checking a float through a String

I'm trying, without using try-catch (I'm not allowed in this case), to know if a String is susceptible to being parsed to double, but it does not accept values, such as 1.80. This is the method: private boolean alturaCorrecta() { boolean c...
asked by 28.11.2016 / 11:56
1
answer

Doubt creating the interface to consume apis with Retrofit when it does not have the @PATH [duplicated]

As the title of the question correctly says, I am trying to show a list of countries with the following URL given by the teacher link , for this I created an interface in the following way: public interface ICountryService { String END...
asked by 26.11.2016 / 21:07
1
answer

Activate a combobox depending on the result of another combobox

I want to upload the values in this combo box depending on the selection made in another combobox. I mean, I have an application that allows you to add a car and I would like to select the values through queries depending on the value taken...
asked by 22.12.2016 / 08:55
1
answer

Go through a data structure looking for them to be the same (reference to memory)?

I have a class that is Place that has a series of data, these I store in an array given that at the time of constructing the objects there can be several with it, so the idea is to go through the array but comparing at the level of reference....
asked by 02.12.2016 / 10:07
1
answer

Problems implementing a method

I am implementing a sendMessage method but I can not do what I want. I have two classes one call User : import java.util.ArrayList; import java.util.List; public class User implements CompetitionListener { private Platform...
asked by 19.12.2016 / 19:24
2
answers

Ask permission the first time I try to make the call (Android 6+)

When I click on the ImageButton for the first time to perform the function of making the call, it does not do anything, I have to go to settings / applications / ... and manually activate the call permission. How could I ask permission for the f...
asked by 20.12.2016 / 01:00