Questions tagged as 'java'

1
answer

How to pass a String from one method to another

Sorry I'm a novice in this, I need to pass a string from one method to another The string I try to pass is called (bd_lat) protected void onCreate(Bundle savedInstanceState) { String bd_lat = object.getString("latitude"); } This is the...
asked by 14.01.2018 / 04:33
1
answer

Background color in xml ANDROID

I have the following code fragment XML button <Button android:id="@+id/strBtnAssociateDevice" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="...
asked by 03.01.2018 / 19:10
1
answer

What is the error HTTP State 404 - / manager / html in tomcat?

What I have just done is download and install version 8.0 of the tomcat server in the eclipse environment, but when I start the server and try to access the tomcat administrator I get the following: I'm accessing with the path of loc...
asked by 27.12.2017 / 00:43
3
answers

I have a conceptual problem about this error: Exception in thread "main" java.lang.ClassCastException: java.lang.String can not be cast

Good afternoon, in a code that I am elaborating in an empirical way I find a conceptual failure on my part and I do not know how to solve it, the error is as follows:    Exception in thread "main" java.lang.ClassCastException: java.lang.Strin...
asked by 22.12.2017 / 22:47
1
answer

How to verify if a data is already registered in the database and to continue comparing the others?

Hi, I'm trying to register data from an excel file but when it finds an existing data it sends an error. How can I do so that when a piece of data is already registered I will continue to verify the others and register them if they are not in th...
asked by 20.12.2017 / 15:43
1
answer

Update JTable cells in real time

Can the cells of a Jtable be updated while it is on the screen? Type opens the window that has the JTable and it is written in it and then with the info that you put before it, it fills other cells. Is that possible?     
asked by 09.01.2018 / 13:52
1
answer

Display data from a matrix in the form of characters

I've been thinking about the following problem for a few days: I have a square matrix of n by n elements created randomly by random math public static void creaMatriz (int matriz [][],int d){ for (int i=0;i<matriz.length;i++){...
asked by 12.12.2017 / 06:45
2
answers

Error connecting mysql base with java

I use the following code to connect to mysql public static void main(String[] args) { MapeadorServicio aux = new MapeadorServicio(); Auto aux1 = new Auto(0); Persistencia p = Persistencia.getInstancia(); p.guardar(aux); } public...
asked by 27.12.2017 / 23:24
1
answer

Problems with JAVA constructor [duplicated]

I have problems with this code. I would have to login, but when I enter the username or user name string it does not identify the object I refer to and if it returns a false. I think there is a problem with the constructor attached to both cod...
asked by 11.12.2017 / 09:26
1
answer

Error: 'incompatible types: Comparable can not be converted to T'

I need to do TDA of Binary Tree, I have my Node class and my ArbolB class, I need to be parameterized and at the same time use the compareTo method for the method of inserting Node, but I get the error: incompatible types: Comparable cannot be...
asked by 14.12.2017 / 02:56