This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title> | |
| Title | |
| </title> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <style> | |
| .clock-container { | |
| background-color: #ccc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <div class="container"> | |
| <h1>Change Background</h1> | |
| <input type="color" id="colorPicker"> | |
| <input type="text"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html lang="en"> | |
| <head> | |
| <title>Counter App</title> | |
| <style> | |
| body { | |
| font-family: Arial; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Baza de date ---- | |
| class Singleton { | |
| private static Singleton instance; //singura instanta | |
| private Singleton() { //constructor PRIVATE - nu poate fi apelat din afara | |
| System.out.println("Instanta a fost creata!"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Car { | |
| private String model = "TESLA"; | |
| class Engine { //clasa interioara | |
| void start() { | |
| System.out.println("MOtorul porneste pentru " + model); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| abstract class Shape { | |
| abstract double calculateArea(); //metoda abstracta, FARA implementare | |
| void display() { | |
| System.out.println("Aria formei este: " + calculateArea()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Shape { | |
| double calculateArea(); //public | |
| double calculatePerimeter(); | |
| } | |
| class Circle implements Shape { | |
| double radius; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Shape { | |
| void draw() { | |
| System.out.println("Desenez o forma geometrica"); | |
| } | |
| } | |
| //subclasa 1 | |
| class Circle extends Shape { | |
| @Override |