?? ?? ?????? ???
???? ?? ??(????? ???) ?? ???? ?? ???? ???(??)? ???(??)? ?? ?? ??? ???? ?? ?? ????? ?????. ??? ?? ?? ??? ?? ?? ???? ???? ??? ? ?? ?? ???? ??? ? ????.
???? ??
- ??? ??: ?? ??? ?? ????? ???? ???? ???(getter ? setter)? ?? ?????.
- ??? ?? ?? ??: ???? ???? ?? ??? ??? ?? ?? ??? ???? ??? ? ????.
- ??? ??: ??? ?? ?? ???? ???? ???? ?? ????? ???? ???? ??? ? ????.
?? ??: ??? ??
// Encapsulation refers to restricting access of a class from the outside world public class Person { private String name; private String profession; private double height; private int ID; private int age; // Constructor public Person(String name, String profession, double height, int iD, int age) { this.name = name; this.profession = profession; this.height = height; ID = iD; this.age = age; } // Getters and setters for accessing private fields public String getName() { return name; } public void setName(String name) { this.name = name; } public String getProfession() { return profession; } public void setProfession(String profession) { this.profession = profession; } public double getHeight() { return height; } public void setHeight(double height) { this.height = height; } public int getID() { return ID; } public void setID(int iD) { ID = iD; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } // Main method to demonstrate encapsulation public static void main(String[] args) { Person myPerson = new Person("Robert", "doctor", 130.4, 39, 23); // Accessing private fields through getter methods System.out.println(myPerson.getName()); System.out.println(myPerson.getProfession()); System.out.println(myPerson.getID()); System.out.println(myPerson.getAge()); } }
?? ??
??? ??
??, ??, ?, ???, ?? ??? ???? ???? ????. ?? ?? ??? ???? ?? ???? ? ????.
??? ??
getName(), setName(), getProfession() ?? ?? ?? ???? ??? ??? ?? ??? ??? ??? ??? ???. ??? ??? ???? ?? ??? ?? ???? ???? ???? ??? ? ????.
???
Person ???? ??? ???? ???? ??? ??????. ??? ?? ??? ??? ???? ?????.
?? ??
?? ??? ???? ??? ????? ?????. ??? ??? getter ???? ?? ????? ??????.
??? ??
-
??? ??:
- ??? ??? ?? ?????? ??? ? ???? ?????? ???? ??? ??? ? ????.
-
??? ??:
- ??? ???? ??? ???? ????? ??? ?? ??? ??? ? ????. ?? ??:
public void setAge(int age) { if (age > 0) { this.age = age; } else { System.out.println("Age must be positive."); } }
-
?? ???:
- ?? ??? ???? ??(?: ?? ?? ??) ???? ???? ?? ??? ??? ?? ????.
? ???? ???? ?? Person ???? ???? ???? ?? ?? ??? ??? ??? ?? ??? ?? ??? ?????? ???? ??? ?????.
? ??? ?? ?? ?????? ??? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Java??? ?? ??? ????? ? ?? ?? ???? ????. ??, ?? ??? ??? ??? ?? ? ? ???, ?? ?? ?? ??? ?? ?? ?? ???? ??? ?????. Runnable? run () ????? ?? ?? ??? ??? ?? ?? ? ????? ??? ?????. ??, Callable? ?? ??? ?????? ?? ?? ? ??? ?? ? ????. ?? ????? ????? ??? ???????. ??, Runnable? ??? ?? ExecutorService? ?? ?? ? ? ??? Callable? ExecutorService?? ??? ? ??? ?? ??? ?? ? ? ????.

Java? ??? ?? ??, ?? ? ??? (? : Projectreactor) ? Java19? ?? ???? ??? ??? ?????? ?????. 1. CompletableFuture? ?? ??? ?? ?? ??? ? ?? ??? ????? ?? ??????? ? ?? ??? ?????. 2. Projectreactor? ?? ? ??? ??? ???? ?? ???? ? ??? ???? ?? ? ?????? ?????. 3. ?? ???? ??? ??? ??? I/O ??? ? ??? ???? ?? ??? ????? ??? ???? ????. ? ???? ?? ??? ????? ??? ??? ??? ?? ??? ??? ?????? ???? ???? ?? ?? ??? ??????.

Javanio? Java 1.4? ?? ? ??? IOAPI???. 1) ?? ? ??? ?????, 2) ??, ?? ? ??? ?? ?? ??, 3) ? ??? ??? ???? 4) ?? ??? ?? IO?? ? ????? ?????. 1) ? ?? IO? ??? ?? ??? ???, 2) ??? ??? ?? ???? ?????, 3) ???? ?????? ???? 4) ??? ?? ??? ?? ?? ? ??? ?????. 1) ??? ??/??? ??? ?? ?????, 2) ???? ???? ???? ?? ???? ???????. 3) ??? ??? ??? ???????.

Java?? ??? ?? ?? ??? ???? ? ?????. ?? ???? ??? ?????. 1. ?? ?? ? ???? ??????? ?? ?? ?? ??? ???? ??? ?????. 2. ?? ??, ???, ??? ?? ?? ?? ???? ????? ?? ??? ??? ??? ?????. 3. ENUMMAP ? ENUMSET? ???? ?? ? ?? ???? ???? ??? ???? ? ?????? ?????. 4. ?? ?, ??? ?? ?? ??? ?? ????? ?? ??? ??? ?????.? ????? ?? ???? ????????. ??? ???? ???? ?? ??? ????? ??? ?? ? ??? ?? ?????? ???????.

Java? ????? ????? ??? ??? ?? ???? ?? ?? ??????, ?? ? ???? ? ??? ????. ?? ???? ??? ??? ???? ??? ??? ???? ?? ??? ??? ????. ???? ???? ??? ??, ?? ??? ???? ???? ?? ??? ?? ???? ?? ?????. ???? ?? ?? ??? ?? ?? ??? ?????. ?????? ?? ??? ??? ???? ?? ??? ??? ?? ??? ???? ???? ??? ?? ??? ?????? ???? ????? ??? ?? ?? ???, ?? ? ?? ???? ??? ??? ?????. ???? urlclassl? ?? ??? ??? ??? ?? ? ? ????

JavaprovidesmultiplesynchronizationToolsforthreadsAfety.1.SynchronizedBlocksensUremutualExclusionByLockingMethodSorspecificCodesections.2.reentrantLockofferAdcerAdcenctrol, ratelockandFairnessPolicies.3.ConditionVariablesStowFor

Java ?? ??? ??? ?? ? ??? ???? ?? ??? ???? Try-Catch? ???? ????? ????? ???? ????. 1. IoException? ?? ?? ? ??? ???? ?? ??? ??? ?? ???????. 2. NullPointerException? ?? ???? ?? ??? ????? ???? ?? ??? ?? ???? ??? ?????. 3. ??? ?? ? ?? ??? ???? ??? ??? ?? ????? ???????. 4. CODE? ?? ??? ??? ?? ??? ???? ??? ???? ??? ???? ?? ?? ????. 5. ?? ???? ??? ??? ?? ??? ??? ?? ???? ??? ???????.

?? ?? Java? ?? ???? ?? ? ? ? ????? ????, ? ??? ??? ??? ??? ???? ? ????. 1. ?? ?? hashcode () ???? ???? ?? ?? ???? ?? ??? ?? ?? ???? ?????. 2. ?? ??? ??? ?? ?? ???? ??? ??? ? ????. ?? ??? ?? ? ??? ??? ?????. JDK8 ? ?? ? ??? ?? ?? (?? ?? 8) ??? ????? ?? ???? ?? ? ??? ?????. 3. ??? ?? ???? ?? ???? ?? equals () ? hashcode () ???? ?? ???????. 4. ?? ?? ??? ???? ?????. ?? ?? ??? ???? ?? ?? (?? 0.75)? ??? ?? ? ???; 5. ?? ?? ??? ??? ??? Multithreaded?? Concu? ???????.
