A voir également:
- Algorithme
- Algorithme euromillion excel gratuit - Télécharger - Loisirs créatifs
- Algorithme ajout rapide snapchat - Forum Snapchat
- ALgorithme dans Algobox - Forum Algorithmes / Méthodes
- Logiciel algorithme gratuit - Télécharger - Édition & Programmation
- Algorithme keno excel - Forum LibreOffice / OpenOffice
1 réponse
Voici un petit exemple en java qui affiche la date plus l'argument
public static void main(String []args) {
// Make sure the command
// line argument was passed in
if(null == args || args.length < 1) {
// Command line argument
// doesn't exist, so exit with
// an error flag
System.exit(1);
}
// Timestamp the message
Date now = new Date();
String message = now.toString();
message += ": ";
// Extract the only command line
// argument from the first element
// of the array
message += args[0];
System.out.println(message);
}
public static void main(String []args) {
// Make sure the command
// line argument was passed in
if(null == args || args.length < 1) {
// Command line argument
// doesn't exist, so exit with
// an error flag
System.exit(1);
}
// Timestamp the message
Date now = new Date();
String message = now.toString();
message += ": ";
// Extract the only command line
// argument from the first element
// of the array
message += args[0];
System.out.println(message);
}