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
-
-1
votes1
answer261
viewsSeparate listings of an object for each object of the type of another class
Good night. My question is in relation to the algorithm of my project, I am trying to make an application where each Customer can place several orders but each order belongs to a different Customer.…
-
-1
votes1
answer701
viewsBrowse recursive directories in JAVA
I’m doing a work for the college on how to go through directories with java recursive and so far I have this code here: package Control; import java.awt.Desktop; import java.io.*; public class…
javaasked 9 years, 5 months ago Vinícius Novelli 173 -
-1
votes1
answer295
viewsWhy is it mandatory to initialize a final variable when an instance is built?
In a certification review, I came across the following code: public class Initializer { static int si = 10; int i; final boolean bool; } It generates build error in variable declaration final…
javaasked 8 years ago Murillo Goulart 3,391 -
-1
votes1
answer76
viewsAndroid Development
What are the disadvantages of using Eclipse instead of Android Studio in the development of an Android application? I want to start developing my App, but because I have a very limited Hardware I…
-
-1
votes1
answer53
viewsProblem getting date from screen
I have a small error when picking a jtextfield date, error occurs: String cannot be converted to date Follows my code: public TelaControle getVendaFromTela() throws ParseException { Venda vDaTela =…
-
-1
votes1
answer246
viewsCannot resolve method getcontext() or getItem()
Hi, Trying to pass the data of an Arraylist, but error appears in the methods…
-
-1
votes2
answers145
viewsI am unable to list my Sqlite data
Good evening, I’m creating an application for financial control, and I’m testing the database, making it show me the data to see if the event Insert is working. When you open Activity that shows the…
-
-1
votes1
answer94
viewsError accessing Jtable line
In my system is giving error in the line of code ModelUsuario modelUsuario = new ModelUsuario(); ControllerUsuario controllerUsuario = new ControllerUsuario(); //recebe a linha selecionada int linha…
-
-1
votes1
answer439
viewsJava - How do I leave the Postgresql Permanent Connection IP?
Good morning, Every time my machine connects to the internet, her IP address changes. My question is... How do I always get access to Postgresql even if the IP of my machine changes? public class…
-
-1
votes1
answer742
viewsHow to implement Jasperreports and iReport( or Jaspersoft) in a reporting system?
I have a system with a good part of the ready functionalities registered and all do routes finalized. I will now create a report that the user will make the request of what he wants to generate and…
-
-1
votes1
answer130
viewsCompile a webservice
I created a Webservice in eclipse using java, but as I compile this Webservice and put to work without the need to install Eclipse? Note: I used Tomcat as a server
-
-1
votes1
answer1571
viewsArraylist of 2 dimensions
I recently started working with ArrayList, but my question is how to create a matrix of ArrayList.
-
-1
votes1
answer398
viewsVoice command that triggers a button in the Android app
I am beginner in Android and I made a structure for Speech to text, I would like to know how to trigger a button inside the application using this function.
-
-1
votes1
answer351
viewsDelete database record with ajax+spring boot+Thymeleaf
Good afternoon! I am trying to delete an item in my view, which is in a bootstrap table. I am using Thymeleaf + bootstrapna frontend. The idea is to take the id and move to a modal window of the…
-
-1
votes1
answer47
viewsJava arithmetic operations with database data
What is the best way to calculate values in java? I need to make a method that returns the sum of all inputs and output and subtraction. Example: Insert all Double entries in column X, and all…
-
-1
votes2
answers423
viewsHow to form a number to have 10 decimal places?
I have a sum operation and have to display the result in a number with 10 decimal places of accuracy. Any idea?
-
-1
votes1
answer656
viewsHash function in java
Could someone show me (and explain) a hash (scatter) function without being the? (key % size)? I would like it to be a simple one (and one that exists). In this case I have a table of 11 positions…
-
-1
votes2
answers2088
viewsWhere to change the name of the project?
I have a project with the following link http://localhost:8080/Reliability/Home.xhtml . It turns out that the real name should be http://localhost:8080/Previoussales/Home.xhtml where I could change…
-
-1
votes1
answer92
viewsConvert data, how to proceed?
I’m having a little problem with my code. In my bank when saved the date 03/07/2017 it works, but in the bank of my family’s company, only works if I enter the date 07/03/2017. That date the…
-
-1
votes1
answer183
viewsAddall items in combobox
I have a ComboBox, and I am trying to put items (string values) but it is not accepting. I did it this way: private ComboBox<?> meuCombo; public void combos() { meuCombo.getItems().addAll("A",…
-
-1
votes1
answer48
viewsConsidering a BD that is based on ODBC, what is the function of the JDBC in this case?
What is the purpose of JDBC in a comic based on ODBC?
-
-1
votes2
answers1145
viewsJasperreports, Document Does Not Contain Pages?
Hello, I’m new to Jasperreports and I’m facing a problem to be able to generate my first report (a DANFE), everything I’ve seen about Jasper so far involved database, as my application does not use…
-
-1
votes1
answer673
views2 Counts of Inaccessiblewsdlexception
I am developing an application that consumes a third party web service. When I run the application via Eclipse it works perfectly. But when running via command line, the error "2 Counts of…
-
-1
votes2
answers1434
viewsCEP and CPF validation API in Java
Does anyone know of a Java API that validates CPF and CEP?
-
-1
votes2
answers462
viewsWhat technology to use to develop a Webservices for Android
I’m starting in the Android world and identified that for the application I’m designing I will have to follow a Webservices architecture using a database on Cloud platform. The database I’ve already…
-
-1
votes1
answer37
viewsDirect information exchange between Android and Desktop
Folks I would like to know if it is possible for me to develop an app that communicates directly with another application I developed on the computer, without the need for a server or webservice for…
-
-1
votes1
answer54
viewsDoubt in receiving data
I have a system on one computer that will send data to another system on another computer. The system that will receive the data will need to read this received data in real time and automatically.…
javaasked 9 years, 2 months ago Rodrigo Lima 315 -
-1
votes1
answer69
viewsHow to use an image in android application that is saved on a web server?
I have an android application that selects an image of Sdcard and sends it to a php webservice that saves the image on a server and writes the image path to the database (Mysql). What I wanted to do…
-
-1
votes2
answers244
viewsWhich framework or tool can I use to generate reports?
I have a question about reporting in Java: In my case I need a tool to generate daily reports that can be printed or exported. Which framework or tool you can tell me?
javaasked 7 years, 8 months ago Antonio Sergio 19 -
-1
votes2
answers236
viewsHow to count the number of bits of a text using java
I’m making a particular app, I literally scoured the internet and I couldn’t find a way to count the number of bits of a particular phrase, someone can help me.
javaasked 7 years, 8 months ago Leone Cerqueira 164 -
-1
votes1
answer3501
viewsWhich Java library returns the computer language?
package horadosistema; import java.util.Date; public class HoraDoSistema { public static void main(String[] args) { Date relogio = new Date(); …
javaasked 7 years, 8 months ago Daniel Dias 49 -
-1
votes1
answer986
views -
-1
votes1
answer52
viewsLoop code not satisfied
import java.util.Scanner; public class CodigoDeBarras { public static void main (String[] args) { do { Scanner sc = new Scanner(System.in); System.out.println("Informe os primeiros 12 caracteres do…
-
-1
votes1
answer279
viewsCopy a Jtextfield date to a Jdatechooser
Currently I mirror the JDateChooser for a JTextField, but now I need to mirror a JTextField for a JDateChooser. How to copy and convert a date from a text field to Jdatechooser? I use it this way to…
-
-1
votes1
answer1013
viewsSend notifications from a website to android push notifications
I created a social network, and implemented notifications on it. However, I can’t find an effective way to send site notifications (likes, comments, messages) by push notifications to the android…
-
-1
votes2
answers381
viewsHow to create several variables of the same type without repeating conditions?
import java.util.ArrayList; import java.util.Scanner; class Main { public static void main(String[] args) { Categoria c1 = new Categoria(); c1.categoria = "-Reprodução"; c1.nome = "Ahmed Shafik";…
-
-1
votes1
answer41
viewsComparison between Objects always returns false
Why even with that: ValidacaoHelper.saoIguais(3044, 3044), that is, with equal parameters, the return is false? /** * @param obj * objeto a ser validado * @return TRUE se o objetos passados por…
-
-1
votes1
answer486
viewsUpload an image when opening the app on Android
I need the moment I open my Android app to charge the logo and then appear the Home. Someone has the code to do?
-
-1
votes1
answer173
viewsVector for Jtextfield
I have to add 43 text fields that the user will fill the ones that will be used to have a total and this total will be used in my formula and I could not find a solution to reduce these lines that I…
-
-1
votes1
answer87
viewsCode locks the window
I have this code in my game and I check if it’s past 400 milliseconds, and then update. public void setUpdatePosition(int posicao, long tempo, int posX, int posY) { long previous =…
-
-1
votes2
answers1469
viewsTarget Unreachable error, Identifier 'Clientebean' resolved to null
System with error: Error message: Caused by: javax.el.Propertynotfoundexception: /index.xhtml @22,72 value="#{Clientebean.cliente.name}": Target Unreachable, Identifier 'Clientebean' resolved to…
-
-1
votes1
answer193
viewsError entering database data into Jtable
I’m having a problem loading the data into a Jtable, use BD Derby, the database connection works more when trying to open the Jframe Cad_usuarios appears the error below: Exception in thread…
-
-1
votes2
answers177
viewsIssue with JAVAC version for dynamic build
I’m trying to compile a Helloworld class for testing, and it’s giving an error that I don’t know how to solve. Does anyone know a solution? From the looks of it, it’s some version-related problem.…
-
-1
votes1
answer110
viewsFile location txt Android ndk / C++
I made a c++ code to create a file: I’ve already given the manifest permission to read and record: My question is:???…
-
-1
votes2
answers369
viewsRead Java console string
I need to know how to receive Strings that are being printed on the console to do some kind of treatment on them.
-
-1
votes1
answer362
viewsc3p0 generating many connections
Code that gets the connection InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:/comp/env/jdbc/oracledb"); Connection connection = ds.getConnection();…
-
-1
votes1
answer90
viewsPMD and checkstyle in windows 10
How and which link to install PMD and Checkstyle in windows 10. I only see Linux tutor .
-
-1
votes1
answer1092
viewsRecursive Fibonacci sequence
I’m studying Java and I need to do a recursive Fibonacci program, but I have no idea how to do that. Please, if you know, help me. Here’s an inductive code: public static void main(String[] args) {…
-
-1
votes1
answer258
viewsObfuscating a string in the source code
I need to hide a string in the source code of my program. Searching I found a programmer who hid the phrase "Hello World!" through a chain of if and loops tying everything to a array numerical. The…
-
-1
votes1
answer129
viewsWhy does that line of code make me wrong?
This line of code gives me error in sentence SQLiteDatabase.CREATE_IF_NECESSARY and stops me from making the database. Because this is happening? SQLiteDatabase…