[Go to site: main page, start]

0% found this document useful (0 votes)
6 views73 pages

Java

The document provides an overview of the Java programming language, covering character sets, tokens, operators, data types, control statements, and arrays. It includes examples of syntax and operations, highlighting key concepts such as type casting, string pooling, and error handling. The document serves as a reference for understanding Java's structure and functionality.

Uploaded by

phool chand
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views73 pages

Java

The document provides an overview of the Java programming language, covering character sets, tokens, operators, data types, control statements, and arrays. It includes examples of syntax and operations, highlighting key concepts such as type casting, string pooling, and error handling. The document serves as a reference for understanding Java's structure and functionality.

Uploaded by

phool chand
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lexicals in Jaya

Character Set
C
Encoding [Link] Unicode-16 ASC-II 1/8
Bita 1616 Brits 7 bibs/8bits

Total characts 65536 1R8 256

Allan guageare 84pporcable Only mgluh


Uhicode PAT \ THIT Hexadecimal aT
AT1
A 1uo04
3 146
16564
8192
u0g6 2049
5R 56 R8 64 32 16 64 2I
0000o0o o000 oo65
T L
0
4

Minimum Valut in
unicode> \u0000
Maximum valu in unicodle >
\uffff/\uFFFF
Tokens

Kaguord denti firr Ponchuator Hlhite spares Litmal

Keyuord Predefined tokeng Meaning aor word (Fix)/Reseried


-

(48+2
goto const aar non uorking reervd
kepo0rd
entibier Alphabt, Nymber, Underscore T Curmeysmbsls
($.4,7 ete)
Ex oid hegillo t
static void heoacllo t)

Punchuator symbols ( , i,i,t,-,x d]


-

P Symbols fBavaT Uuc compiler *1|

Ahiteepaces Exter, Tab, space Program Rendable aitd 1)


1AT Compiler ignor aTT 1
Literal

Number Tet

ntper (48) Single charactr String


uoy "Hello
DeCimal Octa! Hexadedindi biary 'A "Hello es
35,17 065OX5 obro000 tC
td 0 X 8) o- of charat

Real

fbat lHb) Double (8 8)


?5f 5
binary
int a =ob1o0 0001;
Systm- uth- priethn (al); Op-> 65
chay a= ob10oo001;
Syastm-0ueb-prth (a); Olp+ A

int a- 2,365
Sytm- out-printInlal; p7 Error
Split ndto deckraion and
asignreut
4-02-22

Opeyadors in Java
-

Aivthmatic oprator-
Almost Same as Cand C+t
Java flood emider () aH &
E float Q-11,b
Systm 0utpriv-ln/ a 6];
Op 1-0

gnore mewt, Decrtment-(Java pre-u8e-post Et ZA '

Ex- public chss CAB 1

public staric void main (5tring


arg ti
Floar Q-5, b=6, C-0;
596 +

Systom 0ut printh( c);


b
Systm 0ut prirtlh (a);
O/p 19
6 6
Ex Imt a-5:
Systm-0ut prmth(att+ +4 t a-t--;
576 t 7 1 6 t5
Op7 Q

ype casting im Jav

Jva inbult baa uidnjing (utomaticaliy


Taryrouing allotw t at mplicit Tc
User manualy aiT 75TTEI Explicit TC

Ex
Ex inta=10-5X narrouing
X
( daturype float str double
nt a 5 1f x vabu d dabtye ict ¥ inkialie
TYT Error AAIE1)
Float a 5 lidening
short &byte-
ExShort a-2;
short b-3
short C0
Catb,
systm- 0ut pintln[c); , c -(sbort| atb;
O/p-> Error Java short atr byeke s TET opea-ion

frshore r bgkt stort Ts7uAHUT Emr


Numevic romotion
byte r short , dakafgpes WtH4s at operakion

Ex bute a-5
bufe ba3;
byke C 0
C-at+b
Sstmout prindlh (c)j
O/p- error

Datarpe Size
baol (bavkan) undefined (1bit)
byte 1 B
3 char ?8
4 Shord 8
48
float 46
7 Jong 88
8 double 8B

x C5 datetype km*i(¢* shoret along it * |


Ex int a-5 it a-
55;narrouing X
double b 3-3 double b- 33;

Systm-0out printIn (atb); Sop (a46);


Op>8:3 Wideming Op EroY

Ex loa a-5-5; Error


floaf - 5:5f;
float a (floaf) 5-s ; v TC by user (sr T REÅT¢

Relational/ Comperarive oprrador

,,
7 , > , == , !=
C Compilr zAT Output hr relational Operator 8PTK
OAT1 Jorm OAT Java H Tue r false
, as ur Java ù 37IT T
databype bool (bmlean)
-

bolad True str false valu GTat *


Ex int a-5,b- 3
Systmout printen (a76);
O/p True

Ex Ixt -5, b=3;


Systtm-0ut psinfln( a==b);
O/p False

Java Relakional operaror Result, boolean type T

Logical Operator
0/1 bIHT W&

Binavy Umary
&4 Logiral AND
3Logcl Ne
, loqical 0R
- u fJava EURT Tue false ù6uW KAT
AND J sfalke op falk
OR HTrut T 0/p True

EXSystem- out- println ( 576 4& RI =13);


o/p fal&e

5,b-6 Haa Q5, b--6


a 44 b a 44 b
5 8-6
544-6
tnye 43 tmue
op1 Op true

ExSystm- out printn 576 |


!{R1=09) );
o/p false Sale ll!(True)
False
bitwise/ Low level operator

Unary Binar
1(omplomeut AND
OR
3 A -OR
4
L4 Shift
5 7 Right Shift
nput Outpat Unsigned
Right shift
Binary New value

> (Unsigned Right Shift) -

FHMSB( Most slgnificant bit) # ART o et

Ex
System-out-privdn (5<<a); 0p 20
System-out- pintn/ 50>2a); Op12
Systmout println( 50-0>720); op Enror float X
System out printlh{ 1 >7 3);
yp-1 (ntsl aR
3,4,5cte qns abw
Ex Sustmout pmrint ln507772) Op 12
unsigned
Hourtie wmber kr=ft st arr Right shift mt mse
always ro entr INT, TtATT p aHT Same AIT
H50>7 2 8TA 50 2, gngwer R I
R- Negative Nun ber O/p Same Tt Ar}UTT
System out priutIn (-I >>2); p
Sustem out privtin (1>Y>) ; o/p 1073 7HI0R3
Signed (3 bit *

Assignmact Operator
-Binary opPrafor GT R-valu -value store ar
singe valu) (variable)
EX a-5
5,6,7 O/p 5
6-0
-43
-(5,6, 7), Op 1
5 6 a=(541,6), (141); olp->8
a/-5+
a /l5+3);
1o/(S+2);
1
Miscellaneouk Operator
Size of () Java H x

Ternary/Conditional operafor (?:)

A ?B:C
ATrue alse
Candri--

Ex-
Systm-our printin| 5<lo ? +3 : *3);
0lp 5

Vaviable in Jav

Same a CC
Use F Flexibility Reusabilit
Variable is a 8pace in menory (RAM) which
stores 8ome
value har can be changed
during program exe cution
Control Stafm tnt in Java

Coutrol stutrmest cowrols tlow of


program.

bramching Loping Jumping


i-de .
For break
sWIth-Ca8 while goto xJa
do-while -

Continue
for-each L 7ctun
Ex il (
Sustem. out printin ("Hello"
elst
[Link] printn (" Hi ");
O/p Error FIT Java 4-che, o11 w-t
tue /false uork AT&

E ivt a-34 b-23


if (ab)
System out privtln( "hilo")
Systm outprintlh (° Hi"]:
Olp Hello

Swirtth (a)
Cae 1 5-0p ("A"), benk;
C0e(1+1): S.0.p. ("8");
Cage('A): S0p("c");
default S-0-p-("X"); brak; OlpB
C
Ex for( int i-I; i-5;it|

Cowtinue i
Olp->1
3
Sqstm out- printnl7); 4

Ex int a-3;
while (a<-5)
i f (a==4) Ofp-> nnif lop
X 3
Coninui
else
Systm out printin (a);
Ex int a=3;
, whilt (a «=b)
O/p4
break;
else
S-0-p-(++0);*
Ex int a-3
do
,x lt (==4

brpak;
else
System-out pricdtin ++a); ;
while (a<=o);True
O/p 4
Array in Java

syntax
int ati= new intt [ size];
- - - -

Java, dunamic 8I 3HT QYray,TUntime R NT


3HTRPT new uBe BT|
int EJa 1 ixt at RAR dAT UEFT
it
avray type (Vayiable)

Smitiakrzcahon
int at] =
new int Li
f,3,33,44, 55};
Snitialize
T time size meution 48t
RG
Tava H) array, inser t snt values
{u23,35, 14 s
4PHeIT GHITHT AR Eror r hanele
Compiler
int a[]= new int
Taj {U,3,35; X Erov
Ex int a L] -
new iut [ ,33, 35, 44, 55 ;

Systm-out priutln( a [31);


Olp 44
Ex Syetem: out println(a[s1);
0/p eroY araybound out of ndex

C/
Ctallow èar F3HA pointrr
ar 1-2 p/ace TT A5 memory
Occupy a ?

for-each ( terator)

Array tndex out of bound, problem ¥Au 1recbr


COncept GHbAT JPAT

Syntax
for (Tterator : Name of Anay)

herator Tpes al vales(int, double ee


-lopltrvatbr), q7--F (automatically) array t fst value lara
C

d ime Javq i (valaes) fara i

Ex
Ex t atj =
new int [i {1,23,33, 44, 55 3;
for (ind i:a)
System out printBn[i);
33
33
44
55

Ex Syskmout println (aru);


o/p ror Arrqy ndex out of bound
Ex double ai new doubleI7 1, 9-3, 3-3;
=

for (dooble i:a


Systm out privefin (t);
Olp 11
22
3.3
35-08-R

Java String Pooling

C Java

char Stj"ABC"; String SI-"UTKARSH"


String sa- "UTkARSH"
chersI "Age
SI ARC SI ABC
S

C Compiler, location -

Java valuts (Conteut]


Compart WrHT PIMI A Compare k TH&FH
String(Poinder), Compile time Same String ftaat vauus same
Sa,51
S2, 51 87poiut atesta poiut srt &1 st valus
ar8T memory Adrss stt
C
Java
#include <stdio th
4 include <conio-h
void main public staic void main (String
argr1
chay S1t:"UTKARSH"'; String $1 "UTKAASH";
chor 5L-"UTKAASH"; String S UTKARSH";
chsro
51- Sa)
prinf( "Yes"); Systm out-prindn " Yes ");
else
else
printf " No"} Systom-out-printdn("No");
Address
Compared
Location Values matehed
O/p NO mismathed Olp Yes
-

E String S1 =" UTRARSH";


String S4-"UTKARSH"
Strig 53- "utkarsh'; String S"UTARSH";
i4 s1-53) l (51= S2)
Sro-p-(Yes"); Sysken out-printhn" Yey");
else else
S-0-P("No");
[Link]-privnt in ("No");
olp No valuas misnatr 0lp No valaes mismadrhed
hashcode (1
HT method B ue, object Adress r

Ex public stafic void main(String ag [i

String S1= "UTKARSH";


Stving Sa = "UTKARSH"

Systm-outpritin| 54); p UTKARSH


System-aut priutIn(51+s9]); /p UTKARSH U TKARSH
Systm-ou-prinkbh(s14 ""+t); ohUTKAQSH UTKARSH
S.0-p-([Link])+ " '+S2-hashedeu); Opr 60453RI78 60453178

String $1="UTKARSH";
String 52= " UARSH";
S.0-p- [Link]) +" "+S-hash@cet ); ap> 604532179 80517147
new ktpoord
Sring
String s1 nw String ("UTKARSH'|;
Shring
String $2 Mew String( "UTKARSH");
il (s1-53
Systmout-priuth("Yes");
ebe
Systm out printIn ("No ";
Op7 No

G S1 AOT new aThString s1 T"UTKARSH*


mmory% addres (AAT100 HT store T
CHT S T new fRI AT String 58 6T "vTKSH"
mmory PB T address (Les aume 200 Store gAT|
neLw 51 u8e, poling dsadvandag! a àfau kATan
poproIngoignal memorydaka/value*
overdap #
means poling ¥ $2 daa/value r change Kaft change
51atar oaraTtjfamdr orignal String danage e md
Shring s- nau String ("UTKASH");
string 93- neuw String ("UTHASH");
S-0-P-(51 hashcode(14""4 s2-haghCde);
0lp 6045 3178 6045 3 178

[Link]-pritIn[ S1= = 53);

l p false Addyess Compare

Sysemout- printIn (s1 eguals(s2));


0lp true yayes compare

if(S1= S)
S-0p-( Yes");
Op- No Addrewes tonpared
else
S.0p(" No");

(s1 equals(52)
S-0-p("Yes;
else olpYes Value Compared
S0-p-"No ");

X new string T Y AT ==,


-equaly AT qn8er Ya
Compare To l) -

T Strings faar difertnce 4IAT&I

Ex String S1 new String (" UTKARSH";

Strmg
Strimg $2 e u String("UTKARSH";
Systrm-ouk-printnl st. compare To (s2));
p-0
Ex- String $3 =new String("ATKARSH");
String S4 neuw String" 6TKARSH";
Systm- out-print/n (52- CompartTo (54));
olp |
Constructor

Java Costructor NYUFT dstryctor et et

EX
public class CAB1

- - Congtructor
CAG1 efult

Systm out-prinddn "Hello );

public stahe void main ( String argta


CAB1 A new CAB1 (l; - - - -

Constructor 7
aHT objert ATAEt

Olp 3 Hello

Java Constructor sitz me thod Gai T -HHT class aIH

Constructor AT void 18f AURTI


Ex public clas CAB1
- Constructor
CAB1(1

Systm ouf-prinftin("Hello ");

Normal Mehod
void CAB1I

Systm-out privdln ('H"1:

public static void main (String argt


CAB1 A neu CAB1 ; Constructor Tobjectam
-- nethod 5Tobject
A. CAB1;

Op7 Hello
Hi

Tava H frimd Jnction sit rimd chs-t Ht eik


salety RrJomphole
this object- keyword

Java this poinfer(->) T this ohject r araT?


H data srvariable Name, Same H His HI u8e
public class CAB1

inta
CAB 1 (int yl

void Hello )

t a-30;
Systm- out println (this-a); i [Link]-(a);
Olp 30
public Stafic void main (Strimg apti
CAB1 Anaw CAB1 (1o) ;
[Link]();

O/p->10
onhreritance in daya.

Tava inheritance afear extmds kapunrd UBe PAT


TITHFT& Java 5 program Hg mmber
Ex clase Aple
public int a; - s tatic public int a;
HelloR mainl
public clas8 CAB exfends Apple
Void Hellotl --i stadic void Hello()
Eror
a-1 Fstake mcHod,non- stahie
Sgstm-out-prindln/a);
public staric void main(String agri]
CAB1 A- ntlhy CAB1) i
-- -12
System outpritnla);
A Hello ()
O/p-> Eror
PT main () static &t
ronstatic inta à diret
p712
Package 4import
-Package Javafolder à use BurT}
ae HIRT T Arrange r |
Same ngme Giet files manage (collisionHHT

Fully Qualified Name


-
jat st method 8 s4t clau stt Blprevious)
package
IH&A, T parkage *HeBs GArT
Ex
package pack; package Computer;
public class pack public clas Harduare
ublic stabic void main(String t7 args publie stahie void keboard ty

Compudrr Harduare-kybordt;Systm out printh/"his i


keyboard";
-

Enpty Package- rty color *hckage withelases- Yellu


Color
import
-

package, import et aAIT,FEV6d clases r import Pr


THATHT(closses storic methods 8rst )
Program6tfirst line EPRIT package art,import t1

Ex package pack ; - - - -

Aluays program t first lihe


,

impork Camputer. Hardware


public clag8 Pack
public static void main
(String E] args
Hardware keyboard (l3
o/p- This is keyboard
import 3tatment

clas&es mettiod
import staic impor
import Apple *j inpor:staBic Computtr Haduar.
Aple package RT closscs import keybuard;
Computer-package
import Apple Banana Hardware-clas8
Apple packiage st3T7 Banana dlas keyboard- stutic metiod
Types of inheri ton ce in Java

Single dnheritance

MulH lerel inheridance

C
3

Heimchy tnhri tance

Thvamulfiple mheritance etEmTFI


-

HET C clas a st
anbiuily&rofs

a, class C * mheritzaT?
C
ar class A 7Eclass 8 3
Jara tror t t
-

uaatc++ Mhudkple inheitave


aldou Feitt s t class i t
member HTaT& TE AUTclass Name
AIAT
A::0 8::0
-

Jiya Sope esalationoperator(:]Tt


4 JavaHybnid inkeridance adlw uet virkval iwheritare
allow INT|( Diamond problem

Super Keyword
Super Keyaoord WT parent clas member Ar child claas r

Super keyword ZRT Pareut clay metod As anarAIT


Means Super T funetion calling ai H WT
Only noy-static methods at
Stabic mehod non-stafic members u8e
.
Super non-8tafic 4Tobjecth member use
static classmenber t 1
vAAI
Ex closs Apple

Apple U) Constructor

Q-100;

public chss lack ertmds Agple


it a
Pack ( Consgtructov
a=50
void display () -----
Normal Mehod

Systrm out printio (supr-a); Sop(a)s


L p2 50
public stahic vaid main (String t) args)
Pack D- new Pack );
P-display t;
3
p-l00
Ex- class Aple

nt a
Aple ()
-100
veid pdisplay l
void displayl
Sgstm-0ut pridn (a): }
public class Pack extnds Apple
t a
Pack ()
=50
void display
spsem-ou printn(al:3
public static vaid main (String Ii
args)
Pack P-nu Pack11; P-display 0
L-
P polisplay; O/p9 50
0/p- l0o
50 [Link]
Pdisplay (0;
3
Ex7 class Apple

static t stt non-stahic methl


Apple (1
EPAIT hon-taic arobje«t
a-100 ember
through WATTKAI?1
void dis ()
Sgstom-out prinbin (a) i3

public dlass Pack extmds Apple


int a;
pack Lq-50:
void diaplay 11
hon-stahie metha
Part clos
superdis (1;
. -

--- dsu sperENT


inheriddur
Spstom 0out printJn (stpeT a);
~super, parest ek,=
oublie static void main (String IJ angs ) non-static dah
T Ter ETN
L
Pack P=new Pack 1;
Pdisplay I0; Super dis () Enrov
T main(1 static è o
O/p2 100 Ton-static metkod dis()
100
38-02-23

Super I1- Constructor chaining in Jav


34RT3aNT child class onstnuctor
super clas
COnsbuctor z&Nr fon HATÝ1
Ex class Apple
int a;
Apple t
System-0ut privtln ("super Class "li
public class ack extnds Apple
ipt a, Java internalla
Pack (1 Super1 CATAIEI

System-0ut printbn[ "Child clay");7


public static void main (String I] args
fack P-nuy fackl0; - -

Child clay Pack 57oljet


-r-
HTA &SERT Onstructr
p upey class KI(aubomatcalla)
constretort
s
Chid dlass super clas App.k
Aple () HTpoHi |
Ex class Apple
i
ple (it gl

Sptem-out- pridln ly]ià


public clas8 Pack extmds Apple
int a
Pack( t x
Super(+30);
Systom-out- privdn |a;

public static void main (String [] args Start


Pack -ruw Pack (50]; 0

Op 80
50
inol
Java Const sit7 goto -H , 3HTT Final

fina variable -

value change EAT |

Expublic class Pack


pack (1

final int- 4s
a-55

Systm-aud-printIn/a);
Qublic static void
main(String ti args
Pack P-new fackl);
3
3 Op- Error Remove Finad modifier from
yariabk t
final method OVeTeidmg - aft
Ex
class Apple
void Hello (1 final void Hello/
Syotom 0u-println/'Superclas;

public clas Pack extmds Appe

void Hllo 1

Systom Out prinéIn("Child cla")

public static void main ( String E] args


Pack D=nw fack (
P. Hello (17

p Child clay 0/p7 Error


Ovmaiding Ovnmeiding X
3final clay -4nhrit et wusi

Ex final class Aple

yoid Hello 1

Suptem- out-prindn ["Super clas"

public clau adk ertnds Apple


void Hi t
Syetm-oud prindh ("Child cay"): }
public static void main (String I arg
Pack D-neuw Pack ;
[Link]

Op EryDY CanTor inhernit fnod ces


Aple
Annotation

76 Starting 8nft (Venfiakion method/ndiador


Ex
class Apple

void Helloty
fS:op( "Super Clos");Í

public clas Pack extmds Apple

@Ovraidt - void Helb(int <) x


yoid Hello1 - -- Void hellot)x
S-0-p-( Child Clow"); Override Eror

qublic storic vaid main (String EI argsl


Pack P- n lack (l;
[Link] (1
Olp7 Child Class
Upcastimg / Rumtime Palmorphism

Super class oT Refertnce Child cla ohject d


Refor PAHI

Supey Class Relrce Child class Obect

Supar clas& Reerence, Child cla Object har


Super clags member point r 3
STTAT&

Super Child
M
MiR
M2
super R1 Child R2
Ex- ublic static void main (Sring ti args)
fack Pnew Pack); v Apple P- nto lackll;
[Link] () P-Hellol),
O/p> Child clay p Child class
o 1 - 0 3 - 2 3

Abstract class
Pltclass aHD abstaet methiod HT
Abstract method-
HT melhod ftaet body -Te8 T
=0
pare virtuad fanction &1 IHT?

Normal Method- void helo t

Abstract Method abstract void hello ti;


Staie Method static void hello (

Delaut Mehod- dmtvoid helo i


3
Jara&yTversions noma punetion, ntrkace
STAT JRT TT
myna unchion HTE #kTHT*1
Ctt Ahrtdact ches st datnfare T %t Mx
GHT Java HUT- 3HT

Abstract cla88
Pardial Abstraction l00 Abstraction
Some function abstract
All ave abstract fr tong
5ome noYma
Java 8 dntrface
static method H dehult method
add Barapr
Multipe inheritmce X Mutiplk imheritance \
SHIRTimplrmentotear taran1
Data str mefhod teatsft -by delaul i data, Anal à
stethod, pblic gar
Start aith abstract kypuwd
tort oith nterkace keyuord.
Normal clus8 Abstract class drerface
class Aple abstract clov Apple ntertace Apple

4nheritance Snheritance Jnheritance X

Ex indrrface Apple
int a-5
abstract void Helln;
3
public class Pack implemnts Apple
pablic voidHello t) ---
void Hello ( Error
djaut
-- Int q-93; 6mr mthod public
Sysem out printhn[ a) ;} iutorfaceL_E
daka
chaneX by delauls Ainal m
ublic gtatic void main( String ]
args
ack P-neb Pack (;
P. Hello t);

3 p-5
Esception Handling
try,throw. catch, trous, Finally- 5
Kaywords
Sinally Method &HT exception sm A7-T 3
T condrtions PT7
Ex
void Helo (1

it a-10 jintb- s
nt b-o; a
trySystm out-privetin ( .
Exception FTt
catch HATI
catth Exception e] t S.0-p-(e);} Arihmehe tseption
finallg Systm-aut privdIn l" Amally Excepon "); 3
public staric void main Lfnaly
(String ]
args
Pack D-nuw Pack1; e- java-Aritmmahic
kxcepti on:/by d
P-Hello 1

ap 5 ---try TI
Finaly Exception --- finally ATI
throws

tyouws EANT Method HATRT TT Caller fnction


Toetify
Totiby NHITr method * Eeption 3T H
package pack; package Compuber;
import [Link];
public clas Pack public clas Hardonve

pablic static Yoid main(string lian public void kuboard ) t#rowe Avithmatic
Excgption
Harduee H-nu Harduare; Eint q=10
nt b-0

cakch (Exaæption el Systn -out println/a/b) ;


S-0-p" EH Saccoutll"ijl

Op7 EH Sucess full

-
AET ackape computer; T throws Rautar package pack; aT neti
W ETo clauy Hardoart, import stm&seir Arthmatie Exeytin
Error 3H2tI
Types of Eception

Checked hception Vochecked Exception Error


-

Compiletime excytion-Runtime excepkion non-addresable


-

Compiler idudify Wr Compile thine îridudhik !


-

try -cath TreAT -bry-cath TRraan

aTRT(Compilation3
Comprier, program T
-

eror show TEI

ror- unrypored excptin Error- Arihmahe agtin


le not found Exception.
mAytbe Caught or derlared
to be thrown
System out -prirtbn ();

class maun
class main Class Printsbream
PSvm ) static Prindstream out ;! vojd
prindIn t
System-out-privedlnl1; 1

Systm class
Out, Systm cla 7 static odject Gtr prikts
clos
team
printn, HE printstreqm class T method 1

Gaphical program in Java


Stwing

You might also like