I have a problem that I do not understand because, it is the following:
When I add an item to the list, it has to check if this item is already in the list but it is not doing it.
if(textNameD.getText().length() > 0 && textNota.getT...
Why does not a method have a void modifier as it does not appear in the documentation?
As soon as I put the public it appeared in the documentation. Is there any more modifier that interferes with this?
In the context of inheritance, when B is subclass of A , an instance of B can be used anywhere where an instance of A is valid. This is the characteristic of polymorphism. However I have a question.
I know it's correct...
I'm currently developing a project that I'm using regular expressions to find certain patterns, however there is a specific String and I need to extract two numbers from this, the expression is like this:
Agência: 0000 Conta: 00000-0...
I have the following Enum:
public enum TipoPokemon {
FIRE("FIRE"),
WATER("WATER"),
GRASS("GRASS"),
ELECTRIC("ELECTRIC"),
ICE("ICE"),
DARK("DARK"),
GHOST("GHOST"),
FAIRY("FAIRY"),
PSYCHIC("PSYCHIC"),
DRA...
I currently use this code:
// Pega a hora
Date hora = new Date();
hora.getTime();
It returns me this:
Thu Aug 28 21:55:42 BRT 2014
I'd like a way to get only hour, minute, and second. How to do this?
I'm having trouble printing a double number,
for example I create a variable of type double,
and it receives the one division 1/3, it would have to show 0.3,
What do I have to do to print 0.3 ???
public class MeuTeste{
public static void mai...
It is always seen as a good programming practice if you create a class for the object, where we have the constructor and we make the methods and another class where we instantiate several objects of the class created previously.
However, I wou...
I'm studying the Java programming language and found an obstacle, by some chance I can not compile this code
import java.util.Random;
public class Random {
public static void main(String[] args){
Random num = new Random();...