Questions tagged as 'java'

1
answer

How to download PDF with url on sdcard? Android

I would like to be able to make a button that when clicked, I downloaded a pdf with the url of this one to the sdcard, but I am not getting at all ...     
asked by 30.07.2015 / 08:55
1
answer

What would be a class of services in an MVC Java project?

Could you tell me the difference between classes in the "control" package in an MVC project and service classes?     
asked by 10.11.2018 / 12:15
2
answers

Initialization of methods with array in the console

I have a class with the following attributes and constructor: private Person[] persons; private int personCount; public PersonDatabase(int defaultPersonsCapacity){ persons = new Person[defaultPersonsCapacity]; personCount = 0; } Y...
asked by 15.12.2018 / 16:12
1
answer

Android HtppGet URL connection

I'm trying to make an android httpget connection to php, I've done all php code connecting to mysql but start giving error starting after the "urlConnection = ..." protected String doInBackground(String... String username = (String) arg0[0]; S...
asked by 19.12.2018 / 00:15
1
answer

Passing an Array of Strings to a preparedStatement?

I'm trying to pass an array of Strings to a preparedStatement , but it's returning this exception: java.sql.SQLFeatureNotSupportedException: This operation is not supported. at com.microsoft.sqlserver.jdbc.SQLServerConnection.create...
asked by 04.07.2017 / 00:29
1
answer

JTextField that accepts only two letters [duplicate]

How do I make it possible for me to enter two letters on the keyboard and not use any other letter, number, or character in a JTextField ? For example: in a field I only want it accepted either the letter T or the letter F (upper case)....
asked by 07.07.2017 / 14:50
1
answer

Error reading txt file line by line

I'm having trouble reading the dist1.txt file and are able to pass the values of each line and pass to an array of the other class. The file has the following format .txt: 1;1;00 1;2;14 1;3;05 1;4;05 1;5;12 1;6;15 2;1;14 2;2;00 2;3;07 2;4;0...
asked by 30.10.2018 / 04:04
1
answer

Delete only rows with checked checkbox in a JTable

How do I delete a row from a% w / o of the lines that are marked in a CheckBox that is in a table cell? I'm using JTable . The code I was able to create, just delete some of the selected records, there is always some left over. I cre...
asked by 01.11.2018 / 19:24
1
answer

Unable to read beyond the end of the stream

I was trying to create a sockets connection between Java and C #, Java being the client and C # the server. But when I use BinaryReader to read the data, it returns an error:    Unable to read beyond the end of the stream. Excerpt from...
asked by 11.05.2014 / 16:28
3
answers

Pass value to a function in java

Hello! in Javascript to pass a value to the function I do: <button onclick="myFunction('valor')">Click me</button> and redemption like this: function myFunction(a){alert(a);} And in java on android, how do I do?     
asked by 10.05.2014 / 01:50