Skip to content
Commits on Source (2)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>exercices_Objets</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
</project>
\ No newline at end of file
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package exo;
/**
*
* @author ramzi
*/
public class exo06 {
public static void main(String[] args) {
String[] joursDeLaSemain={"Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"};
for (int i = 0; i < joursDeLaSemain.length; i++) {
System.out.println(joursDeLaSemain[i]);
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package exo;
/**
*
* @author ramzi
*/
public class exo07 {
public static void main(String[] args) {
String[] fruits = new String [5];
fruits[0]="Kiwi";
fruits[1]="Pomme";
fruits[2]="Banane";
for (int i = 0; i < fruits.length; i++) {
System.out.println(fruits[i]);
if (fruits[i].equals("kiwi")) {
System.out.println("Miam");
}
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package main;
/**
*
* @author ramzi
*/
public class mainClass {
public static void main(String[] args) {
}
}
#Generated by Maven
#Thu Mar 30 15:06:48 CEST 2023
groupId=com.mycompany
artifactId=exercices_Objets
version=1.0-SNAPSHOT
C:\Users\ramzi\Documents\NetBeansProjects\exercices_Objets\src\main\java\exo\exo06.java
C:\Users\ramzi\Documents\NetBeansProjects\exercices_Objets\src\main\java\exo\exo07.java
C:\Users\ramzi\Documents\NetBeansProjects\exercices_Objets\src\main\java\main\mainClass.java