Getting Started with Java Programs

3
GETTING STARTED WITH JAVA PROGRAMS S u n d a y 2 8 A u g u s t 2 0 2 2 1 A n k i t a R K a r i a

Transcript of Getting Started with Java Programs

Page 1: Getting Started with Java Programs

12

April 2

02

3A

nkita

R K

aria

1

GETTING STARTED WITH

JAVA PROGRAMS

Page 2: Getting Started with Java Programs

12

April 2

02

3

2

Ankita

R K

aria

JAVA PROGRAM STRUCTURE

DOCUMENTATION STATEMENTS

PACKAGE STATEMENTS

IMPORT STATEMENTS

INTERFACE STATEMENTS

CLASS DEFINITIONS

Main Method Class { Main method definition }

SuggestedOptional

OptionalOptional

Optional

Essential

Used in INHERITANCE

Page 3: Getting Started with Java Programs

12

April 2

02

3

3

Ankita

R K

aria

EXAMPLES TO SOLVE:-

WAP in JAVA to find greatest of three numbers?

( Without using if-else)

WAP in JAVA to swap two numbers?

WAP to convert the given temperature in

Fahrenheit to Celsius using the following

formula:-

C=(F-32)/1.8