Questions tagged as 'java'

3
answers

Access Denied or network error when trying to show file

I am developing an application Java Web App mounted on Apache Tomcat 8.0.27 . Both in the Internet Explorer browser and Google Chrome , I get errors when I try to show some file that I have deposited locally on my machine. The possible...
asked by 21.10.2016 / 18:17
2
answers

Distinguish accents and non-accents in MySQL and Java

I have created a table in a MySQL database that stores a text field: CREATE TABLE 'Usuarios' ( 'Id' int(11) unsigned NOT NULL AUTO_INCREMENT, 'Nombre' varchar(50) DEFAULT NULL, PRIMARY KEY ('Id') ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAUL...
asked by 23.05.2016 / 21:19
5
answers

How to organize an array?

How do I get this program to organize the data in the same Array so that first the numbers are greater than 0 and then the zeros in the Ordenar() method? For example: Entry    (2,3,0,1,0) Exit    (2,3,1,0,0) He...
asked by 02.11.2016 / 18:47
3
answers

Query about the reserved word "super ()" JAVA

Good afternoon, in my project I have the following attributes and constructor of an Abstract Class: //Attributes private int number; //Constructor public Card ( int number ) { this.number = number ; } Of which inherits the following C...
asked by 27.04.2017 / 21:21
1
answer

How to copy a Sqlite database or file from internal storage to external storage?

How to copy a file or database from internal to external storage, sometimes we need to read files inside the internal storage ( data/data ), which is only possible if the device has root permission. In the case of a device that do...
asked by 15.06.2017 / 22:33
4
answers

Compare the elements of an array against itself

I need to go through an arraylist and compare each element of the array with all the elements of the same array and know which one is repeated more times; I have something like that for (int x = 0; x < lista1.size(); x++) { int t...
asked by 01.07.2017 / 19:36
1
answer

Can you get the name of a variable in Java? [duplicate]

I'm doing a test code and in it I need to get the name of the variable, not the value of it , but I can not find a way to do it. NOTE: What I want to get is the name I gave the variable, not the name of the Class , which in the case of...
asked by 02.05.2017 / 17:12
2
answers

How can I get the width and height of the screen with java?

I'm trying to take a screenshot with Robot() and doing some research I found that I could do it this way robotAwt.createScreenCapture The problem is that the createScreenCapture method receives a rectangle so I figured I could do s...
asked by 04.10.2017 / 18:04
3
answers

Create a hidden java folder?

I have a method that receives a route to create a file in this and of course the directory I do it in this way. public static File createTempFile(String exteString, String nombre, String path) throws IOException { try {...
asked by 05.10.2017 / 00:26
1
answer

Random and arrays

I was working with random and array and I had 2 doubts on the subject. 1) It is possible to create 3 arrays, each one contains images, and with a random one that chooses a random image of the array and at the same time that the array from whi...
asked by 04.07.2016 / 17:05