Questions tagged as 'java'

1
answer

What are the API's for creating GUI in Java?

Is there any other tool besides Swing, AWT and JavaFX to create desktop graphical interface for Java applications?     
asked by 02.03.2015 / 17:49
2
answers

nextInt () after the third integer

Given the example.csv: nome;idade;10;21;32;43;54 I can use the Scanner class to read such a file. Using the .useDelimiter() method and taking advantage of ; to get each value. So I use .next() for nome and...
asked by 06.11.2018 / 17:20
2
answers

How to save the data in the internal memory of an Android device?

I am writing files in the external memory of the device, I am doing the following: File arquivo = new File(Environment.getExternalStorageDirectory()+"/"+ nomeArquivo.getText().toString() + ".txt"); I'm writing the file in the external memor...
asked by 11.02.2014 / 18:51
2
answers

How does AsyncTask really work?

Still, sometimes I get a bit confused with AsyncTask . Here's an example below: private class MyAsyncTask extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... params) {...
asked by 21.06.2017 / 17:44
3
answers

About inserting names into a vector. The user places the course name as argument in the method

I have this method: public void inserirCurso(String nome){ System.out.println(" Cadastre seus cursos aqui."); for(int totalCursos = 0; totalCursos < cursos.length; totalCursos++){ cursos[totalCursos] = nome; } } I'...
asked by 20.01.2016 / 18:18
2
answers

Why does the main method receive parameters? [duplicate]

public static void main(String[] args) What does this string array mean as a parameter? How can these parameters be useful to the developer?     
asked by 14.02.2016 / 05:53
4
answers

Cast of byte type integer

I have the following code: public class Principal { public static void main(String[] args){ int i = 10; byte b = 5; b = (byte)i; b += i; i = b; System.out.println( i ); } } I know the value r...
asked by 18.01.2016 / 19:53
2
answers

Move file list between folders

I have a method that copies files from one folder to another, deleting the file then. It even caters me perfectly, but I would like to know if there is any way to do this without having to use InputStream and OutputStream , since I...
asked by 30.11.2016 / 13:33
2
answers

Make recursive search in all directories and subdirectories of a given folder

I am developing a script to scan a certain folder to search for certain files and delete them or move them to another folder, according to some rules that have already answered this question and on this other question . My idea was to...
asked by 02.12.2016 / 12:16
2
answers

What are the differences between InputStreamReader and Scanner in Java?

I was aware of reading data by Scanner , I know its operation superficially, however I came across some examples using a class called InputStreamReader for reading data. What are the differences between these approaches and if th...
asked by 03.03.2015 / 01:10