---
type: archive
area: archive
status: archived
date: 2026-05-03
created: 2026-05-03
updated: 1980-01-01
tags:
  - archive
---
- Jvm Intern Strings like if there is a text that we want to store in a variable automatically jvm search in this text is stored somewhere in the memory it will use it and not create it for new
- To do this implicitly ".intern()" method
- .indexOf('a') // if a is not part of the string it will return -1
- StringBuilder mutable object that allows modification of the text they represent.
- some methods of StringBuilder:
```java
.appenf('a');
.insert(position,'r');
.delete(positions)
.reverse()
.length()
```
- To declare a text block  we should write it between 
```
""" __________ """
```
- valueOf() vs .parsexxx()
ValueOf create wrapper object based on primitive types or string
parsexx() create wrapper object based on string 
- BigDecimal used to represent decimal numbers that requires exact precision.
### Handling Date
- Using LocalDate, LocalTime api in place of the old Date class because it don't give us the capabilities to manage date ond time separetly.
- Duration, Period, Instant those some objects to manage date more
- We can also manage locals with Locale class to make the output for example matches a specific local
### String
- c.indexOf('T',positionFromWhereToStartSearching)
- Operation on string always return a **new String** never modified the older one.
- Operators are evaluated from left to right unless we  use bracket to make it start with the operation in the bracket.
####
- auto-boxing -> Giving a primitive type o her wrapper class.
- auto-unboxing -> Giving a wrapper class to a var of type primitive.
- **{auto-unboxing, auto-boxing}** reduce performance.
- BigDecimal used when handling decimal numbers that requires exact precision.
- We can manage date and Time in specific zone time.
- We Can create a locale based on a choice of Local.of("country")

#### Formatting date:
![[img-20240818-142705-a0161a2f.png]]

