I have a question that I can not find a convincing answer.
There is an application developed in Delphi 7, and in an extremely complex routine (which takes about 2 hours) we noticed that only the first processor core is used, in this case an I...
In java and other languages I have seen in some projects things like:
saldo -= 100 and sometimes saldo =- 100 , but I could never understand the difference between these two types, if there is any difference.
After all,...
Studying final methods and classes in the book "Programming in Java 6 ed." of Deitel I came across the following proposition:
The methods declared private are implicitly final, because it is impossible to overwrite them in a subclass (alt...
I would like to know if there are libraries or solutions to handle requests containing headers such as Last-Modified , If-Modified-Since , If-Range If-None-Match , etc. and produce replies with Cache-Control ,...
The class SimpleDateFormat is not thread safe . I recently had problems with instances of class SimpleDateFormat in static context being used by multiple threads concurrently in a web application.
private static final DateForm...
If for example I have the code below, I'm comparing the object reference in the ex1 and ex2 case and not the object itself, correct?
Pessoa ex1 = new Pessoa();
Pessoa ex2 = new Pessoa();
if(ex1 == ex2)
{
System.out.println("I...
I work with Java and for countless times I have to do a test object != null on the object before accessing it to avoid NullPointerException
However, I think this practice ends up making the code very ugly, dirty and hard to read....
When trying to compile the following code I got an error.
import java.util.*;
class Animal { }
class Cachorro extends Animal { }
public class TestePoli {
public static void main(String[] args) {
List<Animal> cachorros = new A...
In Java 8 (which was released in March 2014), there is a new interface called Spliterator . It has a similar purpose to the Iterator , but it is designed to perform iterations in parallel .
However, even after reading a lot about this inter...