Questions tagged as 'java'

1
answer

Problems with bluetooth android studio connection

I'm trying to make an application that connects to a Bluetooth module and then be able to navigate between different activities connected to the module. The problem is that the connection in the main activity is fine but when I launch ano...
asked by 28.02.2016 / 20:36
2
answers

doubt on how a class is structured in java

I am just beginning to learn Java and instead of reading 20 documents with 200 pages each, I would like to ask a simple question; what are the methods that can be used in a java class? For example: A. A constructor (has the same nam...
asked by 10.01.2018 / 15:53
1
answer

CountDownTimer unstable according to Android verision / Saving Battery

Currently I need my application after 5 minutes to perform an action in my case to close the session, in my emulators and my phone is 10 but in some phones it does not work, I'm not sure if the battery saving could make do not count the time wit...
asked by 19.12.2018 / 21:21
1
answer

How to filter accents in a selectCheckboxMenu of primefaces

I have a problem using the selectCheckboxMenu filter, since it does not filter the accents, for example I have this list. But when filtering for example the letter "a", only that character filters me and not the accented one. S...
asked by 20.04.2018 / 23:02
1
answer

Find string in file and go back up in file to extract process name

I explain: I have a java application that dumps data of all the processes running on my pc in a text file by means of a command; this file will be generated every 5 seconds for example (thread). The generated file has about 130000 lines, so it's...
asked by 19.10.2016 / 17:20
2
answers

org.hibernate.MappingException: Named query not known

When calling a query with a specific name, the system throws the exception: org.hibernate.MappingException: Named query not known . I've given it several laps but I can not find where the problem is. Consumo.java @Entity @Table( nam...
asked by 03.12.2015 / 16:56
1
answer

FATAL EXCEPTION: main ... Load SQLite query to arrayList and pass it to Recyclerview

Hi, I have a project in Android and what I need is to pass the data of a cursor, that is, a query to an arraylist, and then pass that array to another to "map" each column of the cursor in a class to show the data in a recyclerview. I really hop...
asked by 31.08.2018 / 20:04
2
answers

Using (int) in Java

Some time ago, I noticed that sometimes a type of data appears in the following way. (int) Which I do not understand so that it is done. Some of the cases in which I have seen it, are the following: suma = (int) (math.random * (4+3));...
asked by 21.04.2017 / 13:35
4
answers

How do I get the value true or false in the esVocal () method? Java POO

I defined the class Letter that has an attribute of type char. Develop a method called esVocal() that returns true or false as appropriate. My doubt is that the esVocal() method was not done well, because here I have to use...
asked by 31.10.2018 / 00:23
3
answers

Java Tell a character other than a word

I know how to count the characters of a word but I do not know how to make it not to repeat itself if that character was already counted The output that I intend to draw would be a "RATA" entry, an exit from R 1, A 2, T 1. public class Main...
asked by 01.03.2018 / 13:56