Advertisement
M1RAI

Vecteur.class

Oct 13th, 2021
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. public class Vecteur {
  2.     private int x,y;
  3.     public void afficher(){
  4.         System.out.println("abscisse:" + x +"\nordonné:" y);
  5.     }
  6.     public int Produitscalaire(int x1,y1){
  7.         return x*y1 - y*x1;
  8.     }
  9.     public Vecteur(a){
  10.         x=a;
  11.         y=a;
  12.     }
  13.     public Vecteur(a,b){
  14.         x=a;
  15.         y=b;
  16.     }
  17.     public void finalize() throws Throwable{
  18.         System.out.println("Object is destroyed by the Garbage Collector");
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement