A voir également:
- Algorithme
- Logiciel algorithme euromillion - Télécharger - Loisirs créatifs
- Algorithme application pc - Télécharger - Édition & Programmation
- Ecrire un algorithme qui permet de resoudre ax²+bx+c=0 pdf - Forum Algorithmes / Méthodes
- Algorithme ajout rapide snapchat - Forum Snapchat
- Ajout rapide snap - Forum Snapchat
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);
}