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
answer27
viewsHow to compare 2 different Hashmaps in Java
I have 2 Strings that convert to Hashmaps, the first is an input that the user gives to the application. The second is an Array that contains a lot of words. I need to compare both Hashmaps to see…
-
0
votes0
answers18
viewsUsing Stack Bundle Exercise with Java Search
I need to make an option using the Search of the Java Stack package, where the search will search a value typed by the user and tell whether he is in the list or not, if he is, you need to show the…
-
0
votes0
answers11
viewsHow to read a TXT file when instantiating an object?
At the moment of instantiating an object I need to go through parâmetro a directory with a file . txt and read the same. It would be something like this: Texto t1 = new…
javaasked 4 years, 5 months ago Luciano Balestrin Correa 71 -
0
votes1
answer32
viewsHow to pass a JSP-mounted list and traverse it in a JS function by extracting its values?
I have a jsp page of a legacy code. A piece of it is as follows: <form name="frm_pedido" method="post" action='<%=(flgPrimeiroPedido ? "/pedidoConfirmaEndereco.jsp" :…
-
0
votes1
answer33
viewsProgram that receives a series of notes needs to disregard an invalid entry
Make a program that receives a series of student grades and then print them out. However, the program cannot accept notes greater than 100 or less than 0. If the user types a wrong note, they should…
-
0
votes0
answers70
viewsHow to discover the largest sequence between two vectors?
I have two vectors, one with 10 elements and the other with 5 elements. I need to check how many of these elements are in sequence. For example: I’m basically doing a program that draws 10 random…
-
0
votes0
answers21
viewsHow to expand the window by clicking a button?
I’m trying to expand the screen size using Java Swing. When I click a button I need to increase the height of the screen, consequently appearing two more buttons. I tried to do this in the method…
-
0
votes0
answers19
viewsIt is possible to capture the click result in a Dialogfragment
I’m new in android development and have this doubt. I’m creating a DialogFragment with an interface to capture user choice. This is my dialog box next to the interface: public class Opcoes extends…
-
0
votes0
answers71
viewscom.mysql.jdbc.exceptions.jdbc4.Mysqlnontransientconnectionexception: No Operations allowed after Connection closed
On my hosting service, whenever the time_out server arrives in 8 hours, gives this error: com.mysql.jdbc.exceptions.jdbc4.Mysqlnontransientconnectionexception: No Operations allowed after Connection…
-
0
votes1
answer33
viewsHow to send a list of objects by Bundle?
I am working with a tab system, one for each month, and a birthday listing on the respective tabs. My Adapter is as follows: FragmentPagerItemAdapter adapter = new FragmentPagerItemAdapter(…
-
0
votes0
answers19
viewsSubtraction of an Expression<sql. Timestamp> in the criteriaBuilder
I have the following implementation: private static Specification<Record> sinceMinusMinutes(Integer minutes) { return (Specification<Record>) (root, query, criteriaBuilder) ->…
-
0
votes0
answers18
viewsApp closes when adding code
I created a function that makes the app full screen without using XML Only when I call this function on my second Activity, the APP closes I use main.tela_full package com.mugen.com; import…
-
0
votes0
answers22
viewsProblem when setting route for consumption Soap
I am having trouble making the request to the end point of the post office. It follows below the route I am using. My biggest doubt would be the .to(), I don’t know if I’m doing it right. Below is…
-
0
votes0
answers23
viewsUse the matrix of one method in another method to change its values
I’m doing a job that involves manipulating images in java ( I use Intellij) for my degree. I present below my code and what I would like to do is apply the operations of method alineaC in the matrix…
-
0
votes1
answer115
viewsMap vector in Java
I have a data structure work in which I need to create an array and implement the interface Map of Java and, inside it, I store the ordered maps. I’ve already created the vector, but now I don’t…
-
0
votes0
answers48
viewsWhich path operation in a Binary Tree corresponds?
One of the most important operations in Binary Trees is the path or crossing. In this operation one node at a time is visited. However, there are different path algorithms. Consider that a class…
-
0
votes0
answers220
viewsError when running unit tests of Repository
Previously the test worked and after a while stopped working. The structure in the database was not changed. get the message: Failed to load ApplicationContext java.lang.IllegalStateException:…
-
0
votes0
answers120
viewsHow to include a file in a S3 with localstack using Java?
I created an application using Java with Spring. I set up a localstack and created a Bucket using AWS CLI. Everything went right. Only when I try to include a file using the code below, it bursts an…
-
0
votes0
answers67
viewsDownload compressed folder (.zip) from a URL (FTP) with JAVA
I am trying to download a "zipped" folder through the URL http://portal.insoft4.com.br/site/Download/RepositorioSCR/Teste.zip (FTP) with the following code snippet made in Java: try…
-
0
votes0
answers19
viewsHow to define a Deployment Server for Netbeans?
Good evening! I am studying MVC for Netbeans with the use of Maven. However, I can’t load a xhtml page, because when I click Run Project up there, it builds normally. However, the following message…
-
0
votes1
answer56
viewsApp closes when trying to access an Activity
My app closes whenever I press a button to access an Activity, this is the error q appears: 2020-12-13 18:15:40.182 6951-6951/br.edu.icomp.locadoramoto E/AndroidRuntime: FATAL EXCEPTION: main…
-
0
votes0
answers8
viewsToolbar type is not compatible
I am making a slider menu and the following error is appearing: He says that the type of Toolbar I put is wrong, but I have tried to fix and nothing. To make matters worse he does not say a possible…
-
0
votes0
answers14
viewsPass an object inside another to a Tablelist
When trying to make an outline of my first program I realized that I need to pass to a Tablelist an object within another, I could not understand why Tablelist is not accepting to receive an object…
-
0
votes0
answers47
viewsCreate a Java ID search with Mysql
Hello, I am creating a simple sales system. I am developing a DAO class to work with the products. I did the methods of the bank, but when I go to the methods of listing, a following question…
-
0
votes2
answers41
viewsKotlin+Springboot [Beginner] I can’t create Post method
I didn’t even want to go to Stack in such a simple problem, but it’s already dragging on for days and I managed to implement the GET method with a certain ease, I’m learning Kotlin and java, I’m not…
-
0
votes0
answers31
viewsI need a method that marks an item on a list as completed
I’m making a small app with to-do list that logs in firebase. Through the app I can add tasks to the list and delete with a long click, now I need it to mark "completed" in the app and reflect on…
-
0
votes0
answers8
viewsZk Framework - Dynamic Tabpanel Error
Good night!!! I’m trying to make a dynamic tabpanel, when I click on the clients bar menu, it opens a clients tab with the items (textbox, combobox, etc). More is not working.You are returning the…
-
0
votes0
answers11
viewsWiremock not ordering withRequestBody
I am implementing some tests in my application as follows: stubFor(post(urlPathEqualTo("endpoint")) .withRequestBody(equalToJson(stringJson, true, false))…
-
0
votes0
answers23
viewsHow to open Mainactivity when receiving a Push Notification from Onesignal?
Good morning community, first I wanted to thank the space and ask for your help with the following problem: I have a function of a class that is called every time a notification is received which is…
-
0
votes1
answer38
viewsOpen Alertdialog in current Activity for an already finished android
I’m making a game, in the app as soon as it loses connection to the internet it has to open a Alertdialog in the current Activity, but I’m not getting. alertDialog opens only on the Activity from…
-
0
votes0
answers45
viewsError saving user - Hibernate
I am getting the following error while trying to save a user using Hibernate: java.lang.IllegalArgumentException: Can not set java.lang.String field com.example.apiadote.model.entity.Usuario.email…
-
0
votes0
answers26
viewsError in Android Studio 'The <fileName> stopped. ' caused by Index: 0, Size: 0
Hi, guys. That’s my first question here at Stackoverflow. I am facing a problem in Android Studio: the application is installed on mobile but does not work, nor opens. The error is 'The…
-
0
votes1
answer46
viewsToken does not validate request
I’m following a spring course that’s possibly a little outdated. But I’ll get used to it. The thing is, right now, I have a problem that I can’t solve/understand. I make a token request, I receive…
-
0
votes0
answers18
viewsProblem getting Facebook profile photo
Good night! Using the login with Facebook, the user is authenticated perfectly, I can recover the name and email, but when I try to recover the image from the profile of fb returns a default image,…
-
0
votes0
answers29
viewsAnnotation java + spring boot
I need to take an attribute of an object and modify its value via Annotation, for example: public class MeuDTO { @AlgumaAnnotation private String meuAtributo; } I created the note:…
-
0
votes0
answers37
viewsProblem with the equals
I have three classes, Pai, Filha1, Filha2. The classes Filha1 and Filha2 inherit from Pai, and each class has its own method equals, I want to make an Arraylist both of Filha1 and Filha2. As the two…
-
0
votes2
answers28
viewsData Calendar updating alone
I have a method in the application where I add the service date the warranty time the customer has. To execute the method I return from the database a list with all sales/services performed and when…
-
0
votes0
answers30
viewsHow to Grab Primary Key and Insert Foreign Key from another JSF Table via Selectonemenu
I’m doing a test project, and I’ve reached a point where I can’t pass a PK of one entity to be a Fk in another, I’m getting this PK ID via selectOneMenu but I try to send the value will not, always…
-
0
votes0
answers180
viewsSpringboot, Hibernate does not create tables in the H2 database
Hello I’m trying to use bank H2 with springboot, but tables are not being created in the database automatically. application properties #DataSource spring.datasource.url=jdbc:h2:file:~/fintech…
-
0
votes0
answers26
viewsHow do I close a notification that doesn’t close?
The following notification code I use but it does not close Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID_2) .setSmallIcon(playPauseBtn) .setLargeIcon(thumb)…
-
0
votes0
answers35
viewsTake an input value from a table and pass with parameter in a link
Good afternoon I need to take the value typed in an input inside a table that was fed with a List, and pass this value as parameter in a link, along with other parameters that these already got, due…
-
0
votes0
answers27
viewsgetAutocompletePredictions is not working
Hello, I’m having problems with Getautocompletepredictions from google Api, I’m not able to know if I can fix the function or I have to update the api and redo it.
java android google-maps-api-3
asked 4 years, 4 months ago Deletking 9