There was a change between Java versions 7 and 8. Where in Java 7 for a local variable to be used within a inner class it should be declared final . Now compiling with Java 8, this local variable is no longer required to be declared...
I've been studying the OOP course in Java, and the teacher has spent a lot of time writing the code. Then I have a doubt!
I have 3 classes in java. The class SalaAula, Pessoa and Professor.
SalaAula.java
import java.util.Scanner;
public c...
I need to parse to the following json
{
"rssEmpregados": {
"pesquisa": "marcia",
"registoInicial": "0",
"ordem": "ASC",
"parametrosList": [
{
"parametros": [],
"ta...
I have a project account that makes a deposit, but I'm not able to return a true even if it finds the value in the database
This is my class account method
public boolean depositoConta(double deposito) {
System.out.println("Metodo de Dopos...
I want to use something similar to org.springframework.transaction.annotation.Transactional of Spring that sets up a Transaction only using only the Jersey API. Something similar to the code below:
@Resource
private SessionFactory facto...
I'm developing an application that will execute a processing soon, and I want a message warning that the process is running stay on the screen while it does this processing. I tried to do with JOptionPane , but since it is a modal window b...
I have a string, example:
&texto-outroTexto=09213sdadwqWDQS
Where "09213sdadwqWDQS" would be any text and "&texto-outroTexto=" would be a fixed text.
I wanted to do the Regex of this string. I did it that way, but i...
Ihave3packages,onewheretheguiclassislocated,anotherwhereitwillbethe"scripts" of reading data (in main) and photos and text files in the resources.
File file = new File("/com/Convocatoria/resources/DB.txt");
Scanner sc = new Scanner(fi...
I have a program with 2 classes. The player class that contains only the name attribute:
public class player {
String name;
}
And I have the Main class that has the function below and the same call in main
Public class Principal{
public s...
Can you use this " ImageIcon " as the background for JOptionPane ?
Here is the code I tried:
public static void main(String args []){
UIManager UI = new UIManager();
ImageIcon icon = new ImageIcon("Imagens/Imagem.jpg"); //D...