Principais perguntas e respostas de entrevista e testes online
Plataforma educacional para preparacao de entrevistas, testes online, tutoriais e pratica ao vivo

Desenvolva habilidades com trilhas de aprendizado focadas, simulados e conteudo pronto para entrevistas.

WithoutBook reune perguntas de entrevista por assunto, testes praticos online, tutoriais e guias comparativos em um unico espaco de aprendizado responsivo.

Preparar entrevista

Simulados

Definir como pagina inicial

Adicionar esta pagina aos favoritos

Assinar endereco de e-mail
Inicio / Assuntos de entrevista / Java Support
Entrevistas simuladas LIVE da WithoutBook Java Support Assuntos de entrevista relacionados: 39

Interview Questions and Answers

Conheca as principais perguntas e respostas de entrevista de Java Support para iniciantes e candidatos experientes e prepare-se para entrevistas de emprego.

Total de perguntas: 30 Interview Questions and Answers

A melhor entrevista simulada ao vivo para assistir antes de uma entrevista

Conheca as principais perguntas e respostas de entrevista de Java Support para iniciantes e candidatos experientes e prepare-se para entrevistas de emprego.

Interview Questions and Answers

Pesquise uma pergunta para ver a resposta.

Perguntas e respostas de nivel experiente / especialista

Pergunta 1

What is the difference between '==', 'equals()', and 'hashCode()' methods in Java?

'==' is used to compare object references, 'equals()' is used to compare object content, and 'hashCode()' returns the hash code value of an object. It is recommended to override 'equals()' and 'hashCode()' when dealing with custom classes.

Example:

Example:

@Override
public boolean equals(Object obj) { 
  // custom implementation
}

@Override
public int hashCode() { 
  // custom implementation
}
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 2

Explain the concept of garbage collection in Java.

Garbage collection in Java automatically reclaims the memory occupied by objects that are no longer reachable. The 'java.lang.System.gc()' method and the 'finalize()' method are related to garbage collection.

Example:

No specific example, as garbage collection is a background process handled by the JVM.
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 3

What is the purpose of the 'transient' keyword in Java?

'transient' is used to indicate that a variable should not be serialized during object serialization. The value of a transient variable is not persisted when the object is stored.

Example:

Example:

class MyClass implements Serializable { 
  transient int sensitiveData; 
}
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 4

What is the 'volatile' keyword in Java?

'volatile' is used to indicate that a variable's value may be changed by multiple threads simultaneously. It ensures that the variable is always read from and written to the main memory, avoiding thread-local caching.

Example:

Example:

volatile boolean flag = true; 
// variable shared among multiple threads
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 5

What is the purpose of the 'assert' statement in Java?

The 'assert' statement is used for debugging purposes to check if a given boolean expression is true. If it's false, an 'AssertionError' is thrown. 'assert' statements can be enabled or disabled during runtime using the '-ea' or '-da' JVM options.

Example:

Example:

int x = -1;
assert x >= 0 : 'x should be non-negative';
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 6

What is the 'classpath' in Java, and how is it set?

The 'classpath' is a parameter in the Java Virtual Machine (JVM) that specifies the location of user-defined classes and packages. It can be set using the '-classpath' or '-cp' option when running Java applications. It includes directories, JAR files, and ZIP archives containing Java classes.

Example:

Example:

java -cp myapp.jar com.example.MyClass
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 7

What is the 'NaN' value in Java, and how is it represented?

'NaN' (Not a Number) is a special floating-point value used to represent undefined or unrepresentable results of mathematical operations. It is typically the result of operations like 0.0/0.0 or Math.sqrt(-1). 'NaN' is represented using the 'Double.NaN' constant.

Example:

Example:

double result = 0.0 / 0.0; // results in NaN
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios
Pergunta 8

What is the purpose of the 'java.util.concurrent' package in Java?

The 'java.util.concurrent' package in Java provides a framework for concurrent programming. It includes classes and interfaces for thread management, concurrent collections, synchronization utilities, and high-level concurrency abstractions.

Example:

Example:

ExecutorService executor = Executors.newFixedThreadPool(5);
executor.submit(() -> System.out.println('Hello, concurrent world!'));
executor.shutdown();
Salvar para revisao

Salvar para revisao

Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.

Abrir minha biblioteca de aprendizado
Isto e util?
Adicionar comentario Ver comentarios

Mais uteis segundo os usuarios:

Copyright © 2026, WithoutBook.