Questions tagged as 'java'

1
answer

Parameterize a method with two inputs

I have a method called createTuxedoResponse which will receive a model object that inherits from the BaseRequestModel class, but as a second parameter it will receive a class ( .class ) same that does NOT inherit from BaseRequestModel , h...
asked by 02.12.2018 / 06:46
1
answer

Equivalent FileInputStream in PHP

I would like to pass a PDF file to a binary text string to store it in a field of a SQL Server database (VarBinary). The Java code that is responsible for storing it is the following: FileInputStream fis = new FileInputStream(doc); stmt.s...
asked by 21.11.2018 / 14:11
3
answers

DatePicker subtracts 1 day to date!

My problem is that in my program I load a date for a record through a datepicker, that date I keep in the database, all as Date type. Then when I call the list of the records stored in the database and show it on a table view the date is modifie...
asked by 20.11.2018 / 14:11
1
answer

Error initializing a fragment

People give me this little mistake when initializing the Fragment. BlankFragment is my Fragment. says that the Fragment class is not compatible with the BlankFragment class extending this from Fragment private void seleccionarItem(MenuItem ite...
asked by 11.11.2018 / 04:46
0
answers

Hibernate: @ValueGenerationType within an EmbeddedId does not work when doing INSERT

I am trying to add to my project (use Spring 5.0.2, Spring-data-jpa 2.0.5 and Hibernate 5.2.14) a new annotation that allows me to obtain the date directly from the database (Postgresql) instead of the VM. For this, I have taken as my base th...
asked by 11.11.2018 / 20:31
2
answers

Doubts about encapsulation and objects in OOP

One of the main characteristics of object-oriented programming is encapsulation, I wonder, should all the properties be set to private? Even the objects? Is there a case in which this can be dispensed with or is it a rule as such in POO? Exam...
asked by 10.11.2018 / 18:00
0
answers

JVM can be installed without JRE

I'm new to this java and I'm trying to understand the differences between JVM and JRE. I understand that the JVM is part of JRE. My question is: can JAVA applications run on a computer that has only JVM and NO JRE? In which case is it essential...
asked by 12.11.2018 / 04:06
1
answer

How can I put a JPanel class in a JIntercalFrame?

I have created several JPanel classes and now I want to show them in a JDesktopPane, but in the JDesktopPane you can not open a JPanel, can you? So it occurs to me to call the JPanel class from a JInternalFrame and then call the JInternalFrame t...
asked by 07.12.2018 / 17:19
0
answers

Menu - Android studio

I have made a new menu: res folder > new Layout > menu. In the I have entered 7 icons. <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.andr...
asked by 05.11.2018 / 21:31
0
answers

ArrayList only brings me only the first Android Studio result (ListAdapter)

I have the following problem. I'm taking the sms from my message box, when I walk with the do while it brings me everything when I show it in the print, but when wanting to build the listview it only shows me the first message and the others ign...
asked by 18.12.2018 / 19:35