Most voted "java" questions
Use this tag when the question refers to some resource, information, or problem relating exclusively to the Java programming language. Java is a class-based, statically typed, reflective, and execution environment (JRE) language. Java programs are compiled to bytecode and run on a virtual machine (JVM), allowing a "write Once, run Anywhere" philosophy (WORA).
Learn more…14,468 questions
Sort by count of
-
0
votes1
answer477
viewsBack function to go back on an Android device from Perfecto Lab
Good afternoon Commonwealth, I am using Cucumber in Eclipse to elaborate automated tests on an application installed on an Android that is on a VM, namely hosted on the site Perfecto Lab. Perfecto…
-
0
votes1
answer222
viewsJfreechart with Dynamic values
I have been facing difficulties in creating an online graphic that is dynamic, I got some "progress" but now he accuses me a mistake: Exception in thread "main" org.jfree.data.UnknownKeyException:…
javaasked 7 years ago Rodrigo Prado 192 -
0
votes1
answer3709
viewsJSON Data format
Hello personal I have a webservice that should fetch some infections in the database and return a json object and I’m having problems with date. here is the object import…
-
0
votes2
answers387
viewsHow to calculate two sums with only one button?
I wonder how I can calculate with only one button two different sums, as I did the example in the image. I have the code this way, but only with 2 numbers. How do I make another calculation…
-
0
votes1
answer177
viewsNullpointerexception when calling method return in another class
I have the following method in the Logincontroller class @RequestMapping(value = "/usuarioEntidade", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST) public Resposta…
-
0
votes1
answer140
viewsMaven OWL API How to resolve dependency error
My question concerns Maven. I am working on a project that involves the OWL API library and after trying to load an ontology the project returned an error that can be seen in the following image.…
-
0
votes0
answers45
viewsHow to update simply to the main screen on another screen?
I have a main Activity(MenuBalcao.class), and there is a listviewer that lists order items. There is another Activity(Selecao_Sabores_Produto_Balcao)where I search the order items. However, when I…
-
0
votes0
answers148
viewsWebview, Download Image Download
I have a simple code from Webview and would like to click on the images of the site, download them by asking or downloading directly and sending a message like "saved image" Note 1: I used a tumblr…
-
0
votes1
answer141
viewsNull appears instead of the recovered name
When seeing the application, I see that in the variable nomedoHumano appears null, and the user’s name should appear. Just below the method Onclick, recover the name typed. I’ve thought about…
-
0
votes2
answers646
viewsWhat is wrong with my Thread ultilizando Synchronized - Java
I started to study tread I saw some examples of java7 and java8 ultilizando lambda, I arrived in part to ultiliza the Synchronized that and to leave kind a wait list of threads where the next one is…
-
0
votes1
answer2851
viewsSave in the image gallery taken by the camera and get way of that image. - Android
I have an android app that uses the camera to take pictures and show on a ImageView, Only the photo is not saved in the gallery. I would like to know how to save the image in the gallery and take…
-
0
votes1
answer77
viewsInsert error in Oracle database with Java
When I make a set of insertions in the bank, it says that only the information of the course were inserted, but gang nay. Console STATUS DE CURSO: true STATUS DE CURSO: false Joptionpane Touradao…
-
0
votes1
answer414
viewsHow to search Searchview actionbar for Recycleview data using Kotlin?
Follows code below: class MainActivity : AppCompatActivity(), SearchView.OnQueryTextListener { var list = ArrayList<Shop>() var adapter = ShopAdapter(this, list) var imageModelArrayList:…
-
0
votes0
answers40
viewsError while using android camera inside application
I’m implementing an app where I need to use the camera to take a photo and save it in the gallery, however I’m getting an error when I try to run a command to do this procedure. public class…
-
0
votes0
answers71
viewsProblem saving month - Mysql Workbench
Good afternoon, I am doing a project for project management and I have in the registration form, two dates fields, when entering, when I consult the bank, the dates appear with the wrong month, all…
-
0
votes1
answer106
viewsDistinct number problem in java
package totoloto; import myinputs.*; public class Totoloto { /** * @param args the command line arguments */ public static void main(String[] args) { int aux, k = 0, l, i, j, u; int t = 0, s; int[]…
-
0
votes1
answer346
views@Datetimeformat with daylight saving time error
I’m having a problem converting date of day 15/10/2017 (start of daylight saving time) My mapping is like this: @Column(nullable = false) @NotNull @DateTimeFormat(pattern = "dd/MM/yyyy") private…
-
0
votes1
answer834
viewsHow to disable/enable buttons of a Jframe as an option coming from another Jframe?
Currently I have two buttons on one JFrame: one to save and the other to update. Another JFrame, I have to register and edit. When I click Sign Up, I want the Save to be turned on and update off,…
-
0
votes1
answer68
viewsChecks if a class has a @interface
I have the class below as an example: package br.com.nomeMarca.testes; import br.com.nomeMarca.cidog.interfaces.*; import javafx.beans.property.*; import java.io.*; import java.math.*; import…
-
0
votes2
answers398
viewsImages sent as an attachment in e-mail with Thymeleaf
Hello, I’m sending a dynamic email template using Thymeleaf. The email is displayed correctly with the images, however, the images are also being attached in the body of the email, which should not…
-
0
votes1
answer264
viewsFirebase ID count - Android
In my application, I have an entity called Game which has, among other attributes, a ID. I need that each time this entity is instantiated the ID is incremented + 1. This works until the application…
-
0
votes0
answers29
viewsLibrary error while running outside the IDE
I’m connecting the application to a bluetooth device through a library, runs perfectly within the Netbeans, but then when I’m going to run through. jar gives this error: Exception in thread "main"…
-
0
votes1
answer242
viewsRecycler view does not load when the app first opens
I have a recycler view within a fragment in a tablayout, being the main tab. After logging in, it does not load the data, only loads if I change tab and return, or close and open the APP. Code:…
-
0
votes1
answer450
viewsJframe does not update until function of button finish
When I click the button it calls a method, and until this method finishes the Jframe does not update the program is in the image below private void…
-
0
votes1
answer246
viewsSet a jDateChooser
I’m having a problem doing the insert there in the Postgresql database. The code is apparently ok but time to compile the error. The error is referring to the type of data I try to insert into the…
-
0
votes1
answer1100
viewsConvert Roman Numerals
I know I’ve asked a question on the same subject, but another question has arisen. I am developing an application that converts whole numbers to Roman numbers, as you can see in the code below ...…
-
0
votes1
answer69
viewsProblem when registering user in the list
I’m trying to register users and put them on the list. Initially I just tried to register and test with print. (Still indicates errors) Does anyone know why it’s not working? The mistakes are:…
javaasked 6 years, 11 months ago Maurício Z.B 1,098 -
0
votes1
answer1656
viewsimg no trim using Thymeleaf, spring boot (with Maven)
The image I want to add is in the following directory: /src/main/resources/static/images/logo.png And the HTML tag looks like this: <img width="220px" height="70px"…
-
0
votes1
answer273
viewsEquals and Hashcode
Hello! I have a conceptual question. I have a method readDao(table) within the Object (access to the database) that returns a Hashset called resultRead with all objects in the database of that…
-
0
votes1
answer398
viewsIdentify selection of Jradiobutton
I created a code in java with 2 Jradiobuttons and need it to appear on the console which radio is selected, and when change radio, appear on the console as well. I’ve tried using the…
-
0
votes0
answers44
viewsSending values to BD makes the application too slow
I created a program in java to capture the movement of a sensor and then send the data to a database, so that later the movement is accessed by another machine in real time (or almost) elsewhere.…
-
0
votes1
answer104
viewsDynamically create board
I am solving a problem using RMI of a naval battle, I need to generate the board dynamically according to the user’s need, this code I took from a video and I am adapting as requested in the…
-
0
votes0
answers230
viewsPool server connections for web application
would like to know if it is possible to implement a pool of connections on a server and have it distribute the connections to java desktop applications, if possible would like a direction of what to…
-
0
votes1
answer84
viewsArray list does not store data
//------------------------------------------ Classe diario (metodo localizar aluno)-------------------------------- package gerenciamento; import java.util.ArrayList; public final class Diario {…
-
0
votes1
answer237
viewsjava.lang.Illegalargumentexception: Attempt to create delete Event with null Entity
I have a simple Manufacturer model class only with the attribute 'Description'. My database is populated and the save and edit method is working normally. However when I delete generates in the…
-
0
votes1
answer167
viewsDate not accepted in Mysql database
I have a doubt because I am developing a web application using the Spring Boot, I have my table in the bank Mysql ready and working normally but not saving the date appears this error on the…
javaasked 6 years, 11 months ago WeltonSistemas 75 -
0
votes3
answers9910
viewsRemove first and last character from a string
I need to remove the first and last character from a variable String, tried to use substring for this, but is giving the following error: String index out of range And I’m not finding a way to do…
-
0
votes1
answer191
views -
0
votes1
answer37
viewsProblem with checkbox and Onitemclick event
I created a list with checkbox disabled, where the goal is that when the user clicks on an item in the list, a new screen is opened and the check is marked, but I can’t make the check be marked…
-
0
votes1
answer609
viewsFloat Action Button does not get fixed at the footer with Collapsing Actionbar/Toolbar
I have a Fragment with Coordinator layout, recyclerview and a Float Action Button, and in the view that calls this Fragment has a tablayout that hides and appears as you go up or down the Recycler…
java android android-recyclerview material-design floatingactionbuttonasked 6 years, 11 months ago Julio Antonini 9 -
0
votes1
answer640
viewsmodify notification icon
Can someone explain to me why my notification icon is small and the notification when it "arrives" does not vibrate or make any sound? Thank you. import android.app.Notification; import…
-
0
votes0
answers30
viewsI’m not able to register in APP
I’m trying to register using Firebase. Everything is correct there in Firebase, but when I click on Register in the APP, nothing happens, it seems that the button is without function. Can someone…
-
0
votes2
answers678
viewsConvert String to Array - Java/Groovy
I need to convert a variable string in a array, I tried to do as follows, I have the variable string conteudoLote, where its value is: [["4","SCAB171301BF5","Vazio","Lexmark…
-
0
votes1
answer109
viewsHow do I calculate the percentage of the right number of answers?
Good, I think I have already achieved what I wanted to thank everyone my only doubt is whether a new number is generated every time the user enters a new guess,here is the new code: System . out .…
-
0
votes1
answer103
viewsMiscalculation
Hello, I am with a project of a consortium calculator that is showing error. It receives from the user the following data: Value of the consortium Amount of months % from the reserve fund % of the…
javaasked 6 years, 11 months ago Weriky Alphazero 37 -
0
votes0
answers151
viewsClassnotfoundexception: Proxylet.class
I’m trying to request a ticket through the site of Faz, but a window appears with the phrase "ClassNotFoundException: Proxylet.class", and when I click on information, it appears what I posted…
javaasked 6 years, 11 months ago Rainha do Nilo 1 -
0
votes0
answers234
views -
0
votes1
answer220
viewsCapture field of a complex JSON
I am using the Java language, with the org.json version 2017101 library to capture data from a JSON. Follow JSON below: {query: {"UF":"SP", "results": {"cidades":[ {"cidade":"sao paulo",…
-
0
votes1
answer44
viewsPrevent repetition of an element in a part of the code
I have the following exercise that asks me to define an interval and sum all the even values of that interval showing which numbers are summed between them, like: Min=10 Max=15 10+12+14=36. However.…
-
0
votes0
answers53
viewsWorks in Netbeans but not in Android Studio
The following code works for when the user leaves an editText of the form blank. The code worked in Netbeans but on Androidstudio when running the APK with a blank field it shows the message that…