Jump to content

new GregorianCalendar()


Hercles
 Share

Recommended Posts

Caros, uma dúvida no código abaixo... Veja a pergunta lá.

public class AD1_2014_2
{
public static void main(String[] args)
{
	Cliente c1 = new Cliente ("Fulano", "Rua A", "9999");
	Cliente c2 = new Cliente ("Beltrano", "Rua B", "8888");
	Pedido p1 = new Pedido(1, c1, 500, new GregorianCalendar());  // o que ocorre "new GregorianCalendar()" vai informar a data de hoje?
	PedidoExpresso p2 = new PedidoExpresso(2, c2, 500, new
	GregorianCalendar());
	p2.setDataEntrega(new GregorianCalendar());
	System.out.println(p1.toString());
	System.out.println(p2.toString());
}
}
Edited by Hercles
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.