Questions tagged as 'java'

0
answers

SharedPreferences getting NullPointerException

I'm needing help with SharedPreference. I'm developing a phrases APP, where there is a checkbox that marks the favorite phrases and plays those phrases in SharedPreferences where they can be accessed from a button called bookmarks. The proble...
asked by 08.06.2017 / 23:49
1
answer

Configure Spring Boot with Swagger to generate documentation from a json

Good morning everyone. I'm documenting the APIs of a project using Swagger2. In this documentation, rather than using annotations, a json file is used. I would like to know if it is possible to create a Spring Boot project with Swagger 2,...
asked by 07.06.2017 / 13:18
1
answer

Difference in string size with FontMetrics.charWidth and FontMetrics.stringWidth

I can not understand the following code: String text = "C JEA NAV/NAP GRV NAV/ELT NAV SOLA PVC EXP PRETO "; int posString = FONT_METRICS.stringWidth(text); int posChar = 0; for (int i = 0; i < text.length(); i++) { Character charac...
asked by 08.06.2017 / 20:31
2
answers

Java Aggregation

I would like to create a method in my Teacher class that calculates your salary based on your workload , which is an established function in the Discipline class, a teacher can teach a variety of subjects, the hourly loads of each discipline he...
asked by 07.06.2017 / 13:18
1
answer

Long or Date in JSON

Applications, one server and multiple clients, POST and GET to the server exchange JSON objects. One of the variables that goes along with JSON is datahora atual , I see different Strngs to represent d...
asked by 07.06.2017 / 18:03
1
answer

Saving the File Path in the Bank

I'm having a question I'd like to know with saving the path of images and files I'm uploading currently I save those files to a folder but I'd also like to have the path in the database how can I do this. Well, the controller I use to upload t...
asked by 07.06.2017 / 15:22
1
answer

Data does not persist when saving with dialog box

I have a list where I want to select the item change a field from the product table and save it to the bank via a dialog. Knowing that a product has several histories, ie the relationship is from OneToMany. The item is not being changed. Is ther...
asked by 20.06.2017 / 16:14
0
answers

Problems when running project with xamarin: java / lang / NoClassDefFoundError: java / lang / Object

This always happens when I try to run an Android project or CrossPlatform. How do I resolve this? OBS1: I have the problem again and I do not know what to do, I have no recourse for this.     
asked by 20.06.2017 / 15:39
1
answer

String Handling - javaFX Application

I'm having a problem reading a file and need to remove the accents from the string, but the function is not working in my JavaFX application. Function: public static String remove(String str) { return Normalizer.normalize(str, Normalize...
asked by 09.06.2017 / 19:33
1
answer

Remove the last value from an array

I have a basic college project and one of the requirements of exercise is to remove the last value from an array of integers. I am not able to do with the last value being removed without using an ArrayList, another specification would be to not...
asked by 06.06.2017 / 20:44