Questions tagged as 'java'

3
answers

compare objects in Java?

I'm using Java 8, Netbeans 8.2 and JUnit 4.12. I have two instances of a class that I want to compare to know if they are "equal", where their properties have the same values. That is, if they have id and name, if I write in the test: ass...
asked by 18.07.2018 / 15:54
1
answer

How can I execute actions of a program by putting a '-' [closed]

I was wondering how the compilers like GCC or Java could execute different actions just by putting a '-' . e.g: or also in gcc is the same EDIT: I quote the example of gcc, not because I want to implement...
asked by 18.12.2018 / 21:56
3
answers

Why does not the do-while function validate a response with equalsIgnoreCase?

I want to validate a response in java with a method, but something happens with the condition of the do-while since it is not able to get out of the loop. public static String siNo() { Scanner in =new Scanner(System.in); String res...
asked by 06.11.2017 / 16:15
2
answers

Execution time permissions

I have the following code if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationa...
asked by 07.11.2017 / 19:12
2
answers

Error with data types in Java when compiling

I have a problem trying to compile this exercise in Java, I use the console to compile and the error it throws at me is something like this: Can not convert the data type String to String [] [] How should I Then make the statements? /* Cre...
asked by 12.03.2017 / 18:13
4
answers

Java syntax error

Good morning, I have the following code but it does not run after creating the table in the database. I imagine it will be a syntax error in INSERT or in UPDATE : public class Conectate { private String driver ="com.mysql.jdbc....
asked by 25.02.2017 / 19:12
2
answers

How to use a spinner inside a RecyclerView

I currently have a RecyclerView in which I want to add a kind of Spinner . I want my Spinner to show me a series of data but, I just want to see them, I do not want to let me select any. How can I deactivate them all so that...
asked by 06.10.2016 / 13:49
1
answer

Problem when calling the Keyboard from an AlertDialog that is called from the fragment

Well, basically, I have the following problem. I have a ReciclerView that contains several EditText and will update it as the text changes and when it is required, it will return the list of items. This in turn is done from an AlertDialog, si...
asked by 11.11.2018 / 06:51
3
answers

Messy items Android Studio 2.3

Does anyone know why the objects go out of order? when you ran the application in the emulator, the objects are displayed as messy in the application and not as they are displayed in the development interface. :(  This happened after the android...
asked by 05.03.2017 / 20:46
2
answers

Hide keyboard when launching activity with EditText and show it again

Using the line TuEditText.setInputType(InputType.TYPE_NULL); I managed to hide the EdiText keyboard. However, I have put TuEditText.setInputType(InputType.TYPE_CLASS_TEXT); in the OnClickListener of EditText but it still does no...
asked by 26.07.2017 / 11:36