You are on page 1of 1

toate clasele inherit from java.lang.

Object Can be declared public, private, or


protected or use default access
A nested class is a class that is defined within another class
Can extend any class and implement
A nested class that is not static is called inner class interfaces
A member inner class is a class defined at the same level as instance variables. It is not Can be abstract or final
static. Often, this is just referred to as an inner class without explicitly saying the type.
Cannot declare static fields or methods
A local inner class is defined within a method. except for static final fields
nested classes 4 tipuri
An anonymous inner class is a special case of a local inner class that does not have a Can access members of the outer class
name. including private members

A static nested class is a static class that is defined at the same level as static variables.

Cele 2 constructii sunt echivalente


data

obiect de tip DateTimeFormatter . format( timp )

dataTimp
data

timp . format( obiect de tip DateTimeFormatter )

DateTimeFormatter.ofPattern("MM dd yyyy"); obiect de tip DateTimeFormatter dataTimp

LocalDate.parse( , obiect de tip DateTimeFormatter data

LocalTime.parse( “MM dd yyyy” ) timp

LocalDateTime.parse( dataTimp

You might also like