Questions tagged as 'java'


How does the G1 (Garbage First Collector) work?

In the JEP-248 discussion of the G1 definition ( Garbage First Collector as the default Garbage Collector on Java 9 . In this period, I've been hearing a lot of G1 quotes, but very little material has deeper details or comparisons, for examp...
asked by 25.07.2015 / 05:00

How to remove accents and other graphic signals from a String in Java?

How to remove accents and other graphic signals from a String in Java? Ex .: String s = "maçã"; String semAcento = ???; // resultado: "maca"     
asked by 11.12.2013 / 17:36

How to compare Strings in Java?

The == operator says that the Strings are different, and they store the same literal value, see example: public class TesteString { public static void main(String[] args) { String str1 = "teste"; String str2 = "Otes...
asked by 03.02.2014 / 16:19

What is the View in the MVC standard?

I started in 2016 to use MVC standard, the concept of Model and Controller perfectly understand, / em> intrigues me. What is the View in an MVC template? I know what the client sees (data representation) , but what can be understoo...
asked by 28.11.2016 / 12:42

What is the best way to iterate objects in a HashMap?

What is the best way to iterate the objects in a HashMap in Java in order to have access to the key and value of each entry?     
asked by 11.12.2013 / 17:01

How to read a text file in Java?

I have the file named dados.txt and I want to put it in String . For example: String texto = lerArquivo("conteudo.txt"); Question How to write this method lerArquivo() ?     
asked by 10.01.2014 / 02:55

What is boilerplate code?

I have noticed the frequent use of the term in some forums and I was wondering what its meaning was and where it came from.     
asked by 26.03.2014 / 06:03

Operator + = Java

I've always found that the += operator only worked as a shorter form for the traditional increment, for example: i += j; Instead of: i = i + j; But when performing the following experiment: int i = 3; long j = 7; So when I...
asked by 11.01.2014 / 19:28

What are the standard sizes of android images?

I'm creating my first application on the Android platform and as far as I know one of the downside of this platform is that the devices on the market have different sizes of screens. I created a project in Eclipse and found that it creates 4...
asked by 16.12.2013 / 19:28

What is the difference between JavaBean and POJO?

I'm new to java and I have this doubt. I looked in various places on the internet and asked several JAVA programmers friends but none could clearly explain the difference between the two. What's the difference between JavaBean and POJO?     
asked by 26.06.2014 / 22:16