SlideShare a Scribd company logo
1 of 16
Method, Static
1
www.infoviaan.com
static vs instance
• Static – Assign memory once in life.
• Static variable or static method can call inside static or
non-static area.
• Use static keyword to declare static, method or variable
• Using static, can call directly with class name
ex. ClassName.StaticMethodOrVariable;
• Non- static (Instance) – non-static variable or method are
called instance variable or instance method.
• No one keyword, for declare instance.
• Instance is accessed only, non-static area.
Class
Instance
static
Attributes
Instance
static
Methods
2
www.infoviaan.com
static with variable
public class StaticVariable{
static int x = 789; //static variable
String name = “Laddu”; //non-static (instance) variable
public static void main(String args[]) {
StaticVariable sv = new StaticVariable();
System.out.println(sv.x);
System.out.println(StaticVariable.x);
System.out.println(sv.name);
System.out.println(StaticVariable.name);
//Compile Time Error
}
}
3
www.infoviaan.com
static block
• Static block is used for initializing the static variables.
• This block gets executed when the class is loaded in the
memory.
• A class can have multiple Static blocks, which will
execute in the same sequence in which they have been
written into the program.
4
www.infoviaan.com
Program - static block
public class TestStaticBlock {
static int x = 10;
public static void main(String[] args) {
System.out.println(x+10 +" From Main Method");
}
static {
System.out.print(x + " From Static block n");
}
}
10 From Static block
20 From Main Method
// Executes before main method
// Executes After static block
5
www.infoviaan.com
static class
• Static classes are sealed and therefore cannot be
inherited.
• They cannot inherit from any class except Object.
• Static classes cannot contain an instance constructor.
however, they can contain a static constructor.
• It is Nested class
6
www.infoviaan.com
Use of static
static
class
method
variable Only one time memory allocation
Can be call with Object,
Without Object, and with class name also
Nested class
7
www.infoviaan.com
Function in OOP - Method
• Method – Perform specific operation.
• Categorised into 4 types
1.No Return value and No Arguments
2.No Return value with Arguments
3.Return Value but No Arguments
4.Return Value with Arguments
• Object - Memory instantiation.
8
www.infoviaan.com
No Return value and No Arguments
void display( )
{
System.out.println(“Hello! This is Display method”);
}
static void sum()
{
int a,b,c; // Local variable
a = 45;
b = 35;
c = a + b;
System.out.println(“Sum Result is : ”+ c);
}
public static void main(String args[]){
sum(); //No CE, static method
display(); //Compilation error, method is not static
} 9
www.infoviaan.com
No Return value with Arguments
public class MethodArgument{
static void info(int age, String name ) {
System.out.println(“Hello! My name is: ”+ name + “n My
age is: ”+ age);
}
void div(double x, int y){
double z = x/y;
System.out.println(“Division Result is: ”+ z);
}
public static void main(String args[]) {
info(25, “Ramdev”);
MethodArgument obj; //object declaration
obj = new MethodArgument(); //object instantiation
obj.div(1123.50, 50); //method calling, used with
object
}
} 10
www.infoviaan.com
Return Value but No Arguments
public class MethodReturn{
String info() {
String fullInfo = “Hello! My name is: Ramdev n My age
is: 60 ”
return fullInfo;
}
int multilply(){
int x=78, y=10;
return x*y;
}
public static void main(String args[]) {
MethodReturn m = new MethodArgument();
String s = m.info();
System.out.println(s);
System.out.println(“Result of Multiplication: ” +m.multiply());
}
} 11
www.infoviaan.com
Return Value with Arguments
public class A {
double area(double radius){
return 3.1415*radius*radius;
}
String details(String name, String address, int age, double salary){
String complete = “Name is : ”+name + “n Age is :”+age + “n
Salary is : ”+ salary+ “n Address is: ”+address;
return complete;
}
public static void main(String args[]) {
A a = new A();
A ob = new A();
System.out.println (“Area of Circle is : ” +a.area(2.5));
System.out.println (“Area of Circle is : ” +b.area(3.2));
System.out.println(a.details(“Mark jukerburg”, “USA”,
32, 36872782.8907));
}
} 12
www.infoviaan.com
Calculator
public class Calculator {
int a, b, c; //instance/class variable
public void sum(){
a = 89; b = 78;
c = a + b ;
System.out.println(“Sum Result is: ”+ c);
}
public void subtract(int x, int y){
a= x-y;
System.out.println(“Subtraction Result is: ”+ a);
}
public double division(){
double a,b;
a = 123.678;
b = 5.8;
return a/b;
} 13
www.infoviaan.com
Calculator cont.
public double multiply(double d1, double d2){
return d1*d2;
}
public static void main(String args[]) throws IOException {
Calculator obj = new Calculator();
int choice;
do{
System.out.println(“Enter a for Additionn Enter s for
Subtraction n Enter m for Multiplication n Enter d
for Division n Enter e for Exit ”);
choice = System.in.read();
switch(choice){
case ‘a’ : obj.sum(); break;
case ‘s’ : obj.subtract(356, 89 ); break;
case ‘d’ : System.out.println(“Division Result: ”+obj.div(); break;
case ‘m’: System.out.println(“Multiplication Result:
” + obj.multiply(123.34, 78.90); break;
case ‘e’: break; }
}while(choice!=‘e’);
}
} 14
www.infoviaan.com
QA
1. Difference between static & instance?
2.How to execute statement before main
method?
3.Why function are called method in OOP?
4.What is static block & class explain?
5.What is object declaration & instantiation?
15
www.infoviaan.com
Get in Touch
Thank You
www.infoviaan.com
16
www.infoviaan.com

More Related Content

What's hot (20)

Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Interfaces and abstract classes
Interfaces and abstract classesInterfaces and abstract classes
Interfaces and abstract classes
 
11 lec 11 storage class
11 lec 11 storage class11 lec 11 storage class
11 lec 11 storage class
 
Object-oriented Programming-with C#
Object-oriented Programming-with C#Object-oriented Programming-with C#
Object-oriented Programming-with C#
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
 
Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVA
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programming
 
Exception Handling in Java
Exception Handling in JavaException Handling in Java
Exception Handling in Java
 
Scanner class java
Scanner class javaScanner class java
Scanner class java
 
Basics of Java
Basics of JavaBasics of Java
Basics of Java
 
Final keyword in java
Final keyword in javaFinal keyword in java
Final keyword in java
 
Java threads
Java threadsJava threads
Java threads
 
Java I/O
Java I/OJava I/O
Java I/O
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
 
Collections in Java Notes
Collections in Java NotesCollections in Java Notes
Collections in Java Notes
 
Wrapper classes
Wrapper classes Wrapper classes
Wrapper classes
 
Presentation on-exception-handling
Presentation on-exception-handlingPresentation on-exception-handling
Presentation on-exception-handling
 
Java applet - java
Java applet - javaJava applet - java
Java applet - java
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 

Similar to Static Method, Variable and Block Guide

Similar to Static Method, Variable and Block Guide (20)

Java Methods
Java MethodsJava Methods
Java Methods
 
Chap2 class,objects contd
Chap2 class,objects contdChap2 class,objects contd
Chap2 class,objects contd
 
6. static keyword
6. static keyword6. static keyword
6. static keyword
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
Defining classes-and-objects-1.0
Defining classes-and-objects-1.0Defining classes-and-objects-1.0
Defining classes-and-objects-1.0
 
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdfLECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
 
Chapter i(introduction to java)
Chapter i(introduction to java)Chapter i(introduction to java)
Chapter i(introduction to java)
 
Core java Essentials
Core java EssentialsCore java Essentials
Core java Essentials
 
OOPs & Inheritance Notes
OOPs & Inheritance NotesOOPs & Inheritance Notes
OOPs & Inheritance Notes
 
Static variable
Static  variableStatic  variable
Static variable
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
 
Best Core Java Training In Bangalore
Best Core Java Training In BangaloreBest Core Java Training In Bangalore
Best Core Java Training In Bangalore
 
OOP Lab Report.docx
OOP Lab Report.docxOOP Lab Report.docx
OOP Lab Report.docx
 
Second chapter-java
Second chapter-javaSecond chapter-java
Second chapter-java
 
Core java
Core javaCore java
Core java
 
Chapter 6.6
Chapter 6.6Chapter 6.6
Chapter 6.6
 
OOP with Java - continued
OOP with Java - continuedOOP with Java - continued
OOP with Java - continued
 
Java Basic day-2
Java Basic day-2Java Basic day-2
Java Basic day-2
 
Java ppt Gandhi Ravi (gandhiri@gmail.com)
Java ppt  Gandhi Ravi  (gandhiri@gmail.com)Java ppt  Gandhi Ravi  (gandhiri@gmail.com)
Java ppt Gandhi Ravi (gandhiri@gmail.com)
 
Core java concepts
Core java concepts Core java concepts
Core java concepts
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 

Static Method, Variable and Block Guide

  • 2. static vs instance • Static – Assign memory once in life. • Static variable or static method can call inside static or non-static area. • Use static keyword to declare static, method or variable • Using static, can call directly with class name ex. ClassName.StaticMethodOrVariable; • Non- static (Instance) – non-static variable or method are called instance variable or instance method. • No one keyword, for declare instance. • Instance is accessed only, non-static area. Class Instance static Attributes Instance static Methods 2 www.infoviaan.com
  • 3. static with variable public class StaticVariable{ static int x = 789; //static variable String name = “Laddu”; //non-static (instance) variable public static void main(String args[]) { StaticVariable sv = new StaticVariable(); System.out.println(sv.x); System.out.println(StaticVariable.x); System.out.println(sv.name); System.out.println(StaticVariable.name); //Compile Time Error } } 3 www.infoviaan.com
  • 4. static block • Static block is used for initializing the static variables. • This block gets executed when the class is loaded in the memory. • A class can have multiple Static blocks, which will execute in the same sequence in which they have been written into the program. 4 www.infoviaan.com
  • 5. Program - static block public class TestStaticBlock { static int x = 10; public static void main(String[] args) { System.out.println(x+10 +" From Main Method"); } static { System.out.print(x + " From Static block n"); } } 10 From Static block 20 From Main Method // Executes before main method // Executes After static block 5 www.infoviaan.com
  • 6. static class • Static classes are sealed and therefore cannot be inherited. • They cannot inherit from any class except Object. • Static classes cannot contain an instance constructor. however, they can contain a static constructor. • It is Nested class 6 www.infoviaan.com
  • 7. Use of static static class method variable Only one time memory allocation Can be call with Object, Without Object, and with class name also Nested class 7 www.infoviaan.com
  • 8. Function in OOP - Method • Method – Perform specific operation. • Categorised into 4 types 1.No Return value and No Arguments 2.No Return value with Arguments 3.Return Value but No Arguments 4.Return Value with Arguments • Object - Memory instantiation. 8 www.infoviaan.com
  • 9. No Return value and No Arguments void display( ) { System.out.println(“Hello! This is Display method”); } static void sum() { int a,b,c; // Local variable a = 45; b = 35; c = a + b; System.out.println(“Sum Result is : ”+ c); } public static void main(String args[]){ sum(); //No CE, static method display(); //Compilation error, method is not static } 9 www.infoviaan.com
  • 10. No Return value with Arguments public class MethodArgument{ static void info(int age, String name ) { System.out.println(“Hello! My name is: ”+ name + “n My age is: ”+ age); } void div(double x, int y){ double z = x/y; System.out.println(“Division Result is: ”+ z); } public static void main(String args[]) { info(25, “Ramdev”); MethodArgument obj; //object declaration obj = new MethodArgument(); //object instantiation obj.div(1123.50, 50); //method calling, used with object } } 10 www.infoviaan.com
  • 11. Return Value but No Arguments public class MethodReturn{ String info() { String fullInfo = “Hello! My name is: Ramdev n My age is: 60 ” return fullInfo; } int multilply(){ int x=78, y=10; return x*y; } public static void main(String args[]) { MethodReturn m = new MethodArgument(); String s = m.info(); System.out.println(s); System.out.println(“Result of Multiplication: ” +m.multiply()); } } 11 www.infoviaan.com
  • 12. Return Value with Arguments public class A { double area(double radius){ return 3.1415*radius*radius; } String details(String name, String address, int age, double salary){ String complete = “Name is : ”+name + “n Age is :”+age + “n Salary is : ”+ salary+ “n Address is: ”+address; return complete; } public static void main(String args[]) { A a = new A(); A ob = new A(); System.out.println (“Area of Circle is : ” +a.area(2.5)); System.out.println (“Area of Circle is : ” +b.area(3.2)); System.out.println(a.details(“Mark jukerburg”, “USA”, 32, 36872782.8907)); } } 12 www.infoviaan.com
  • 13. Calculator public class Calculator { int a, b, c; //instance/class variable public void sum(){ a = 89; b = 78; c = a + b ; System.out.println(“Sum Result is: ”+ c); } public void subtract(int x, int y){ a= x-y; System.out.println(“Subtraction Result is: ”+ a); } public double division(){ double a,b; a = 123.678; b = 5.8; return a/b; } 13 www.infoviaan.com
  • 14. Calculator cont. public double multiply(double d1, double d2){ return d1*d2; } public static void main(String args[]) throws IOException { Calculator obj = new Calculator(); int choice; do{ System.out.println(“Enter a for Additionn Enter s for Subtraction n Enter m for Multiplication n Enter d for Division n Enter e for Exit ”); choice = System.in.read(); switch(choice){ case ‘a’ : obj.sum(); break; case ‘s’ : obj.subtract(356, 89 ); break; case ‘d’ : System.out.println(“Division Result: ”+obj.div(); break; case ‘m’: System.out.println(“Multiplication Result: ” + obj.multiply(123.34, 78.90); break; case ‘e’: break; } }while(choice!=‘e’); } } 14 www.infoviaan.com
  • 15. QA 1. Difference between static & instance? 2.How to execute statement before main method? 3.Why function are called method in OOP? 4.What is static block & class explain? 5.What is object declaration & instantiation? 15 www.infoviaan.com
  • 16. Get in Touch Thank You www.infoviaan.com 16 www.infoviaan.com