Transcript for:
Java Programming Language Fundamentals Overview

So now the first topic in SCJP. So keep subheading. Long-wage fundamentals.

Long-wage fundamentals. Long-wage fundamentals. Okay in the there are few topics what we have to discuss so the first one first first topic we will discuss about okay we will discuss about what are various Identifiers. Sir, how we can define identifier? What rules are there?

Like we are going to discuss first identifiers and then we will go for what are various reserved rules in Java. So after that we can go for data types, data types, after that data types and then we can talk about laterals, data types, laterals and then erase concept, data types, laterals, erase. And after completing erase, after completing erase concept then we can go for types of variables, types of variables. types of variables and after types of variables the next sub topic what we have to discuss is where are methods Where are the methods under then main method? where are the methods main method and after the Java here main main method and after completing command line arguments Command line arguments, command line arguments and then Java coding standards, Java coding standards.

Okay, that's all. Sir, these are various loopholes, I mean various, this is the agenda for the first 10 sessions almost. So related to language fundamental, the syllabus, right? Better to take all.

So, this is the agenda for language fundamentals. Identifiers, reserved words, data types, literals, arrays. next types of variables where are the method where are the methods main method command line arguments and then java coding standards and then under then java coding standards java coding standards like so this is the agenda for language fundamentals what we have It's almost 10 sessions we are going to talk, but a bit basic concepts, but compulsory, you people should have clear clarity about these things. A bit basics anyway, right?

Now keep subheading. So basic concept, but still you people are going to get several, several new things. This is the agenda for language fundamentals right now keeps a budding the first one identifiers the first one identifiers identifiers sir can you tell what is identifier identifier which can be used for identification purpose assume that in our class hundred students are there how I can identify each person by using name hello Ravi, Pawan, Shiva, like by using name we can identify each person.

So a name, name in Java program is by default considered as identifier which can be used for identification purpose. Are you getting? A name in Java program is by default considered as identifier which can be used for identification purpose. Okay.

So it can be a class name or it can be a method name or variable name or label name labels also sometimes you know we have some some code like this l1 label l1 is nothing but like or label l2 like this so a name in java program is by default considered as identifier it can be a class name method a name variable name or label name are you able to understand that okay this is so at a name a name in java program a name in java program you a name in java program in java program is called identifier a name in java program is called identifier a name in java program is called identifier it's called identifier identifier which can be used for which can be used for identification purpose purpose it can be methodonym it can be methodonym methodonym Method a name or variable name it can be method a name variable name It can be method a name variable name class name class name class name or label name or label label name name or label label name So a name in Java program by default considered as what? Identifier right are you able to understand? First example, let me take a simple example for you people.

Sir, I am taking class test. Analysis well. Because first example, so class test. Public static. public static void main method public static void main main method string array public static void main string array here I'm taking system dot out dot println system dot out dot println of hello like like I'm taking that system dot out dot println of hello or otherwise one minute on me minute here in the X is equal to 10 that's all I don't want to take a soap index is equal 10 can you tell almost the smallest a Java program in this how many identifiers are they why don't tell wrong answer because it's the first one now how many how many identifiers are they So, I hope you people got clear what is identifier.

A name in Java program is by default considered as identifier. It can be a class name, method name, variable name or label name. So, a name in Java program is identifier.

Can you tell how many identifiers are there in this? 3 or 4? 3 or 4? 4 or 5?

Now, how many identifiers are there? Okay, make sure the first identifier is a test. Sir, name of class.

Class name, name of the class. Second identifier is main, name of method. Main name of method method third identifier is string string So test is the first one main is the second string is the third because string is predefined redefined a Java class name are getting its name name of a class only that's why string fourth one a RGS name of the array Okay, next up fifth one X name of variable are getting a name in Java program Is by default considered as what? Identifier right any explanation is required on how could they say you name itself in Java program by default considered as?

Identifier I took a take this example on example and a highlight How many identifiers are there in this program? Class test, public static void main, class test public static void main string array args. Next, int x is equal to 10. Int x is equal to 10. Int x is equal to 10. Sir, test the main string arc select. Completed, right? Okay, clear for all of you, right?

This one. Now, next one. Okay, sir while defining identifiers Compulsor we should follow certain rules and regulations Best example assume that you have one kid the other kids No, soon. Okay.

Assume you have one kid you have to name your kid regarding you have to name name your kid compulsory we should follow certain rules and regulations okay compulsory we should follow certain rules and regulation like your kid name maybe your ancestor name or maybe god name or goddess name is nothing but like god name we can keep so this type of sentiments usually we are going to follow are you going to keep your kidney as a dog Then the kid is going to go left and right once he grows. So are you going to keep your kidney as a cat or something like that? No.

Compulsory, while defining names, we should follow certain rules and regulations. It's mandatory. while defining java names also while defining java identifiers also there are some rules we have to follow such type of identifiers are by default considered as what valid identifiers right are you getting so what rules we have to follow while defining identifiers compulsory you people should have clarity okay keep somebody rules for rules for defining rules for defining define java identifiers rules for defining java identifiers java identifiers rules rules for defining java identifiers identifiers okay now the first rule take take a bit special care what is the what is the first rule here is observe sir here in java identifiers we cover several Which characters we can use?

Sir, can I use alphabet symbol? Is it possible or not? Yes. So small lowercase letter, uppercase letter. 0 to 9 we can use.

Next, dollars. symbol we can use, underscore symbol we can use. The only allowed characters in Java identifiers are only these things.

By mistake if you are using any other immediately compile to a method by default you are going to get. getting rule number one the only allowed characters in java identifiers are alphabet symbols or digit dollar underscore by mistake if you are using any other immediately comparative method which you are going to get sir just observe total underscore number is it a valid identifier or not total underscore number valid because i'm using these symbols only no problem at all sir total as a symbol is it it valid or invalid invalid because as a symbol we can't use it is not in allowed list characters right that's why so this one is nothing but invalid are you getting sir which characters are allowed in java identifiers compulsory you people should have clarity right okay at first the only allowed characters the only allowed characters the only allowed characters characters in java identifiers are the only allowed characters in java identifiers are the only allowed characters in java identifiers are java identifiers are okay take these things a to z capital a to z 0 to 9 dollar underscore. 0 to 9 dollar underscore.

Dollar dollar underscore. Underscore. Dollar underscore.

Okay. If we are using, if we are using, if we are using any other character. If we are using any other character.

if we are using any other character any other character if we are using any other character we will get compile time error we will get compile time error if we are using any other character we will get compile time error we will get compile time error error example total underscore number total underscore number Total underscore number number Total underscore number next to total as a symbol Total underscore number total as a symbol like okay first one is the value in but second one is invalid right okay next Second rule, okay, most of the languages this rule is there. Sir, total 1, 2, 3. Is it valid or not? Total 1, 2, 3. Valid, valid. No problem at all. 1, 2, 3 total.

is it valid or invalid this one is invalid compile data right because identifier should not start with the digit are you getting this rule is applicable even in c language or c plus plus everywhere right okay this rule is there that's why so identifiers should not start with the digit okay this is so the first one is the valid second one is invalid at this point second identifiers identifiers identifiers can't starts with digit identifiers can't starts with digit identifiers can't starts with digit can't can't starts with digit digit okay take that example total one two three total one two three Valley total one two three Valley but one two three total Total 1, 2, 3. Valid but 1, 2, 3 total. Itself is valid or invalid? Invalid. 1, 2, 3 total. invalid right next sir can you tell is it a valid or invalid just observe this one sir i'm taking class test class test here inter number is equal to 10 inter number number is equal to 10 inter number is equal to 20 inter number number is equal to 20 inter number is equal to 30 in the number is equal to 30 like is it a valid or not sir here lowercase but here first letter is uppercase but here all are uppercase Java identifiers are case sensitive okay so lowercase uppercase there is a difference in there of course Java language itself is considered yes case sensitive programming language are you getting that Java identifiers are case sensitive Java language itself treated as case sensitive language right now observe here we can use the word we can differentiate we can differentiate with respect to case we can differentiate with respect to case is it clear right okay at this point java third rule java identifiers are Java identifiers are case sensitive.

Of course, Java language itself is treated as. java language itself is treated as case sensitive programming language of course java language itself is treated as case sensitive programming language java language itself is treated as case sensitive programming language case case sensitive programming language case sensitive programming language language that's all we're getting so at this example Class test, int number is equal to 10, int capital number is equal to 10, take clearly, int number is equal to 10, int capital number, all are, we can differentiate with respect to case. we can we can differentiate with respect to case anyway right completed i hope okay now so this is the third third rule right fourth one okay sir can you tell in java identifier max how many characters are allowed maximum maximum how many characters are allowed 32 or 64 max max how many characters are allowed 32 or 64 or 64 or 128 before r128 or 128 or 256 or 256 or 512 okay make sure there is no length limit for java identifiers there is no limit on length of identifier right if you want you can take one crore length identifier also but is it good programming practice or not we will say but there is no length limit for java identifiers right best example just observe this one here my requirement is just i'm taking int x x x x x x like is nothing but a big a big identifier I'm taking xxxxx next yyyy like like I'm taking and then we can go for zzzzz like like I'm taking right okay this a sir is equal to 10 I'm taking okay this a now let me keep water wrapping anywhere sir wonderful beautiful identifier is nothing but like sorry is it a valid or invalid for a factly a valid no problem at all for a factly valid sir let me let me compile here just observe java c java c test dot java valid no problem at all suppose assume assume i want to print the value of this variable then the cinema is going to start have you observed system dot out dot println of okay luckily we have copy paste option is there okay so here from here to here i'm taking you Luckily we have here just observed bra next this is the semicolon now observed what is the output by default we are going to get here is yes boss the code compiles fine then the answer is 10 by default are you getting now I call one expert programmer hey i wrote one beautiful program can you please have a look on my program like if i can show this program to any person i'm sure that person is going to give left and right because so how much lengthy code sorry in this lengthy program what thing i'm doing just i declared one variable just i'm trying to print beyond that nothing that's why so highly recommended highly recommended this type of coding is nothing but worst kind of programming practice are getting right so even though there is no length limit but not recommended to take two lengthy identifiers because the readability of the code is going to be down is it clear right add fourth one there is no length limit there is no length limit there is no length limit For Java identifiers, there is no length limit for Java identifiers. There is no length limit for Java identifiers. For Java identifiers.

But, but, but, it is not recommended. But it is not recommended. But it's not recommended to take two lengthy identifiers.

Not recommended to take two lengthy identifiers. Not recommended to take two lengthy identifiers. Two lengthy identifiers.

That's all. Are you able to understand, right? Okay. So this is another point what you people should should aware, right?

Okay. Now next one here see. Sir, index is equal to 10. Is it valid or not? Int x is equal to 10. Valid or not?

Valid. Int if is equal to 20. Valid or not? Invalid. Because what is the reason? If is a reserved word in Java.

Are you getting? If is a reserved word in Java. Or keyword you can use.

Reserved word in Java. If is nothing but there is some meaning is there. How you can use if for your identifier? Reserved words we can't use as identifier. by mistake if you are using compile the error by default you are going to get is it clear for all of you we can't use we can't use reserved words as identifiers we can't use reserved words as identifiers We can't use reserved.

Reserved words as identifiers. Reserved words as identifiers. Identifiers. Okay. Example add.

Int x is equal to 10. Int x is equal to 10. Int if is equal to 20. Int x is equal to 10. Int if is equal to 20. So the first one, is it valid or not? Valid. But second one, invalid. Because we are trying to use a reserved word as identifier.

that's why the problem is coming we can't use reserved words as identifiers right canna are you able to understand right now the next terminology and i make make sure you people should have clear clarity right now the next next terminology here i'm taking class test class test public static wired main method String array aux class test public static void main string array aux Now int string is equal to 8888 int string is equal to 8888 system.out.println of string SOP of string. Sir, value of string is nothing but 888. SOP of string. Similarly, int runnable is equal to 999. SOP of runnable. SOP of runnable. Sir, can you tell what is the output by default you are going to get?

SOP of runnable. What is the output? Sir, interstring is equal to 38 SOP of string. Interrunnable is equal to 39 SOP of runnable.

Can I use the term, in the first case we will get 38, in the second case we will get 39, correct or not? I am. You have to decide.

Is it valid or invalid? 100% paka invalid Are you getting? Because What about string?

String is? Predefined class name Interface is nothing but Predefined Predefined interface name Are you getting? Runnable is nothing but Predefined interface name Now make sure What is the last point we covered? Can you please read?

We can't use We can't use Reserved words as Identifiers, right? Now my question is Who told to you These are reserved words? It is the Predefined Java class name It is the redefine interface name hundred percent paca perfectly valid the answer we are going to get 38 followed by 391 day don't keep any doubt in that okay here see let me let me let me let me run this code here just observe okay i'm taking inter string inter string is equal to triple eight are you getting interesting is equal to triple eight system.out.println a string i'm taking here Sop upstream have you have you observed right interesting is equal to the ability of string okay now make sure Why why string is coming in the red color?

Because it's a class ring now. Let me run this code Sir the code compiles fine, but the answer by default you are going to get the ability the answer valid or not yes similarly inter runnable Runnable is equal to triple nine okay next day Sop of runnable like this i'm taking sop of runnable now the code compiled but the answer by default you are going to get is nothing but three thousand nine any explanation is required on all predefined java class names under interface names happily we can use as identifiers no problem at all now my question is is it recommended or not recommended not recommended worst kind of programming practice because unnecessary readability of the code is going to be down and we are creating confusion okay this here all predefined last one 61 I hope all predefined all predefined Java class names and interface names all predefined Java class names and interface names all predefined Java class names and interface names. And interface names.

Names. We can use. Yars identifiers. All predefined Java class names. And interface names.

We can use yars identifiers. yes we can use yes identifiers we can use yes identifiers we can use as identifiers identifiers okay so yeah example example class a test up public static why it mean Inter string is equal to 8888 S4P of string. So the first one is valid. Inter runnable is equal to 8888 S4P of runnable.

Inter runnable is equal to 8888 S4P of runnable. Sir, is it valid or invalid? So the first one is valid.

Even second one also valid no problem at all are you getting the point right okay now add the theory even though even though it is valid even though it is valid Even though it is valid, even though it is valid, valid, but it is not a good programming practice. Even though it is valid, but it is not a good programming practice. But it is not a good programming practice.

Not a good programming practice because, because, because it reduces, because it reduces readability. because it reduces readability readability and creates confusion because it reduces readability and creates confusion reduces readability and creates confusion okay that's all sir total how many rules we covered on a six rules so can you please spell out what the person the only allowed characters in Java identifiers are alphabet symbols digits dollar underscore next the identity identifier should not starts with the digit next third one identifiers are case sensitive next there is no length limit for java identifiers we can't use a reserved words as identifier all predefined java class names and interface names happily we can use as identifiers right sir from this discussion what is the possibility to ask the bit just i will give list in the which are valid java identifiers and which are not you have to decide okay add Question number, at a bit test type. Which of the following, which of the following? which of the following are are which of the following are valid java identifiers which of the following are valid java identifiers which of the following are valid java identifiers identifiers identifiers okay now listen sir i'm taking total underscore number total underscore number next total as a symbol next a one two three total our total one two three total one two three next Cash cash next underscore dollar underscore dollar underscore dollar underscore all get rate hands next java to share java to share next. Sir here next integer.

Next int, next int, integer int, int, like that's all. Sir, can you tell which are valid identifiers and which are not? First one, valid. second one invalid because the hash symbol we can't use third one invalid because the identifier should not start with a digit fourth one valid no problem fifth one valid sixth one Valid.

Have you observed? I am not doing any mistake. Valid.

Next. Invalid. Because at the right symbol we can't use. Next. This one.

Valid. No problem at all. Alpha numeric characters you can use.

Next. Integer. All predefined Java class names and interface name. Happily we can use as identifier. No problem.

Next. Is it valid or not? Small int is a reserved one. But capital int is not reserved one. That's why this one is value, but last one invalid are you getting right?

May be a chance to ask which of the following are valid identifiers you have to fill. Okay, take all these things Take take Completed right Total underscore number. Next, total hash. 1, 2, 3 total.

Next, total 1, 2, 3. All at the right hands. Next, Java 2 share. integer int int integer int int like i hope is a clear for all of you right any explanation is required okay make sure next one next so that's all this is about identifiers concept what we have now keeps happening reserved words reserved reserved words reserved words extra subtopic reserved words sir here do you know in java So in any language, need not be Java, maybe normal speaking language or programming language, in any language, some words are reserved to represent some meaning or functionality.

Best example. Let me consider our English language only. English.

English language. Have you observed? There are some words which are reserved to represent some meaning or functionality. Best example here is. Okay.

Here. cat reserved to represent one type of animal animal dog reserved to represent one type of animal next Apple this word reserved to represent one type of fruit fruit sir eat This word reserved to represent one type of action action Okay, same our favorite action sleep are getting so dot dot dot like sorry in any language Whether it is normal normal programming language or general speaking language programming language or normal language normal speaking language Some words are reserved to represent some meaning or functionality such type of words are nothing but what? Reserved what sir sir so in English? Crores of reserved words are there so if you if you consider dictionary Oxford is nothing but this much size the dictionaries also you can see but Java language is a small chota programming language are you getting here how many reserved words are there in english crores crores but in java how many reserved words are there is nothing more just are you getting just 53 reserved words are there not crores a small chota programming language is nothing but java right so all these 53 reserved words you should appear are you able to understand okay in java to represent some meaning or functionality such type of words are called such type of words are called such type of words are called reserved words such type of words are called reserved words such type of words words are called such type of words are called reserved words reserved words okay so do you know in java how many reserved words are there all these reserved words words compulsory you people should have clarity right okay this is now just observe and now legend legend this one how many reserved words are there in Java and a total 53 reserved words are there don't write legend total how many are there 53 in the so here 50 keywords are there How many keywords are there?

50 keywords are there and reserved laterals reserved laterals 3 are there. Then immediately you may ask, sir what is the difference between keyword and reserved word? If the reserved word associated with functionality, that is called keyword if the reserved word only to represent some value, not Functionality then reserved a letter for so many reserved letterals are there three write them which is three if you want you can consider true true Do you know true is a reserved word to represent one?

Boolean value. There is no functionality associated with true. True. Okay. False.

True. False. Null.

Null. These three are reserved literals. Next how many keywords are there? 50 in that 50 48 are user keywords and a user keywords how many are there 48 unused keyword how many are there unused keywords how many are there is nothing but a 2 okay which 2 are unused keywords in Java 2 and C O L S T go to to understand as they are unused we can't use but these are keywords only but user keywords how many are there if else if else switch dot dot dot dot like are you getting so compulsory for the exam say all 53 reserved of what's you people should aware it's a easy nothing nothing there we list out all these 53 that pasta take this diagram Reserved words 53 and keywords 50. User keywords 48. User keywords 48. Unuser keywords 2. User keywords 48. Unuser keywords 2. Take take clearly so reserved words Keywords reserved letterals user keywords and user keywords Next how many reserved letterals are there?

true false null true false null null true false null Like this. For the exam sake, all 53 reserved words compulsory you people should aware. All 53 reserved words.

I hope. Completed right? These are the reserved words present in Java. Now let me spell out all these things. Now keep subheading.

Keep subheading. okay keywords for data types keywords keywords for data types keywords for data types keywords for data types of data types sir for data types how many keywords are there okay do you know just I will spell out here just observe by short Care a bite shot in Int long bite shot in clang float double float double Boolean care Boolean care how many how many are there? Gate gate are there.

Okay, like a bite shot care by charting clang float double Boolean care Okay, add add all these things Keywords for data types byte short in the long float double boolean care boolean boolean care care boolean care completed right next one Next point. Keywords for flow control. Sir, how many keywords are there for flow control?

If, else. Switch, if you also switch, within the switch, case, default, within the switch, case, default, next, while, do, do and while, do while, for, for, break, continue, return. break continue return sir can you have you observed how many are there 11 11 are there okay at if else switch case default while do for break continue return For break, continue, return. Break, continue, return.

Like this. Can all of you be able to understand it? Okay. Next one. okay this is the first anyway next up keywords for keywords for modifiers keywords for modifiers modifiers so how many modifiers are there in java 12 modifiers but default we are not going to write that's why here how many should come okay public ah can i can i spell out private Public, private, protected.

If you are not writing anything, it is the default. We can't write. Default.

Next, static, final, static, final, abstract. synchronized synchronized or nized synchronized nized native synchronized native next strict fop do you know this new keyword came in the 1.2 version strict fop next and after that transient transient volatile Transient volatile is nothing but like. Sir, how many are there?

Can you please cross check? 11. Because with the default at 12. 11 are there. Keywords for modifiers. Modifiers are related keywords. Completed I hope.

Next one Keywords for modifiers Okay, next up keywords for keywords for exception handling keywords for exception handling keywords for exception handling handling can you can you can you spell out how many keywords are there for exception earning sir can you can you spell out try catch finally throw throws and better to use a assert because it is also related to exception handling only debugging purpose 1.4 version it is a new thing which came in the 1.4 version right they know how many came six six next one try catch finally throw throws yes sir okay now keeps happening class or related keywords class class related keywords class related keywords sir which keywords are class related keywords okay so here legend class itself is a keyword interface itself is a keyword class interface next uh extends is a keyword implements is a keyword implements extends implements next package itself is a keyword import, import or imports? import itself is a keyword that's why total how many keywords are there? six keywords are there make sure okay like add, enum is a separate keyword I will discuss class, interface, extends, implements, package, imports, import These are the class related keywords. Next, object related keywords. Object related keywords.

Sir, what are various object related keywords? New itself is a keyword. Object related keyword.

Next, instance of. Sir, why the smaller capital? instance of Make sure why the small small bow instance of? super under this Super under this this they know how many modifiers are there is a nothing but so far new instance of so far this that's all only for new instance of super this So do you know delete keyword is not there?

there in Java because destruction of useless objects is the responsibility of garbage collector delete delete keyword is not there next one keeps a budding keeps a budding void return type keyword void void return type keyword void return type keyword void return type keyword sir can you tell Void return type keyword. Okay. Here legend. Legend is at this point.

Void return type keyword. If a method. Won't return anything.

That method we should declare with. Void return type. Do you know.

If I can take like this. Public. M1.

Is it valid or invalid? Invalid. Compile to a method saying. Return type is missing. But in C long way.

Return type is optional. Under default. Return type. But in.

is in the return type in the in the return type if you want to return in the you are not a quarter space for anything but in Java return type is mandatory if a method won't return anything that method we have to declare with water why it okay at this point at the point where in Java In Java, return type is mandatory. If a method won't return anything, if a method won't return anything anything method won't return anything then then then we have to declare that method then we have to declare that method we have to declare that method with them we have to declare that method with the void return type we have to declare that method with the wired return type we have to declare that method with the wired return type return type okay that's all Next step error. But in C language, but in C language, return type is, but in C language, return type is optional. But in C, C language, return type is optional.

Return type is optional. default return type is but in C language return type is optional and the default return type is and the default default return type is now what the default return type default return type is int But in C language, return type is optional and default return type is int. Int.

That's all. Are you getting? Next.

So, keep supporting. Unused keywords. Unused keywords.

Unused keywords. Keywords. Unuser keywords Sir can you tell how many unuser keywords are there in java ok how many are there just don't write listen go to c o n g s t one minute one minute here just there are Two unused keywords are there. Don't write legend.

There are two. Now, first one, goto. Okay? Here do you know, in the C language, goto keyword is there.

But usage of goto... created several problems in more languages you say job go to created several several problems in more languages that's why some people banned this keyword in Java boss you are not allowed to use this keyword like some people banned this keyword in java right okay the same next second one c-o-n-s-t can you tell what the purpose of c-o-n-s-t what the purpose of same to define constant already final keyword is there so use final instead of c1st that's why these two keywords are not allowed by mistake if you are trying to use these two immediately compile the matter which you are going to get okay first one keeps somebody go to first one go to go to first one go to yeah usage of go to usage of go to go to created several problems Usage of go to created several problems Usage of go to created several problems in old languages Usage of go to created several problems in old languages in old old languages Usage of go to created several problems in more languages and hence and hence and hence and hence some people some people banned some people banned this keyword in java some people banned this keyword in java some people banned this keyword in java in java some people banned this keyword in java that's all this is about goto now second one c-o-n-s-t C-O-N-S-T-I-C Use of final Use of final use final final instead of use of final instead of c o n s t use of final instead of c o n s t is final final instead of c o n s t that's all are you getting so but uh go to under c o n s t these are unused keywords by mistake if you are trying to use immediately compile them around we will get it take a note note Go to under Sivayan ST Go to under Sivayan ST or or unused keywords Go to under Sivayan ST or unused keywords and user keywords and if we are trying to use and if we are trying to use and if we are trying to use trying to use we will get compile time error we will get compile time error we will get compile time error error okay that's all this is about go to under c o n s t are you getting right next keeps happening reserved literals reserved literals reserved literals literals Reserved literals. Do you know?

Here don't write legend. How many reserved literals are there? True, false, null. Don't write legend.

Legend this one. Three reserved literals are there. Sir here observe.

True, false. Do you know? These are values for Boolean data type.

Values for Boolean data type. Okay the same. Next.

Next one, null. Null is default value for object reference. Default value for object reference.

Take this one. True, false. Values for Boolean data type.

Null, null default value for object reference. Null default value for object reference. For object reference, reference.

For object reference, reference. object reference that's all default value for object reference that's it completed right okay next step Default value for object object reference right okay now true false and null itself is that clear for all of you right So next one make sure Enum keyword keeps supporting enum Enum keyword Enum keyword so do you know within bracket in which version this one came enum enum 1.5 version enum keyword within bracket 1.5 version sir can you tell when we should go for enum if we want to define a group of named constant then we can go for enum add we can use enum we can use enum To define, we can use enum to define a group of named constants. We can use enum to define a group of named constants.

We can use enum to define a group of named constants. Named constants. We can use enum to define a group of named constants. Named constants. Constants.

Okay. Example. Do you know? In the enum concept, I will explain.

Just enum month. Sir, can you tell what are the allowed values? for month John ah pep dot dot dot not December like John pep dot dot dot DEC like this we have next up enum enum beer sir can tell what are the allowed values for the beer Oh, yo K.

Oh RC F 4 dot dot dot right. Okay at examples enum month In a month next enum beer John pep dot dot dot easy Inambir, KFKO, RCFO. Okay, that's all.

Sir, can you please scratch all the 53 K, count wise can you please scratch 8 plus 11 plus 11, 22 plus 8, 30, 42, 46, 47 49 50 53 that's all all the 53 are there so on the board now by seeing all these 53 there are some common conclusions we can conclude keep somebody conclusions conclusions conclusions sir can you tell among all 53 are you seeing any some common property Hmm, all 53 reserved words contain only alphabet symbols, correct or not? Are you seeing anywhere special characters? No.

Next, all 53 reserved words contain only... lowercase alphabet symbol are you getting you can't see anywhere uppercase character best example instance of do you know o is the smaller capital small strict f of e f is the smaller capital small only everywhere so it should contain only lowercase alphabets you know null null do you know most of the people are going to write null means n u l l or n u l l like no no such type of terminology n should be in the lowercase right okay add first conclusion all 53 reserved words in java all 53 reserved words in java all 53 reserved words in java contains symbols okay one thing next a second do you know in java new keyword is there but delete keyword is there in java no because Destruction of useless objects is the responsibility of garbage collector. Right? Second one.

In Java, we have only new keyword. In Java, we have only new keyword. In Java, we have only new keyword. And there is no delete keyword in Java.

And there is no delete keyword. And there is no delete keyword. Because, and there is no delete keyword because because because destruction of useless objects because the destruction of useless objects destruction of useless objects is the responsible of useless objects is the responsibility of garbage collector of garbage garbage collector like are you getting the point okay this is extra third one third conclusion three third one legend legend very very carefully about this at this point right third one here which keywords are new in Java there are some new keywords are there in Java which are new one is strict a FOP this keyword came in which which version 1.2 version a new keyword 1.2 next this keyword came in which version 1.4 version next enum this keyword came in which version 1.5 version these are three are new keywords in java okay at the following are the following are the following are new keywords in java the following are new keywords in Java new keywords in Java in Java new keywords in Java okay new keywords in Java This is one one thing what you people should aware. Strictly FOP came in the 1.2 version. ESRT came in 1.4 version.

ENAM came in 1.5 version. 1.55 version okay like now next point make make sure you people should should a very clear later sorry yeah strict a FOP you feed a smaller captain huh strictly FOP F with a smaller captain small your legend legend this one strictly FOP okay but not but not a strict FOP Strictly FOP but not strictly FOP first one next ah instance of Instance of why the smaller capital small but not but not Instance of but not instance of next synchronizer nized synchronized but not synchronized I got a synchronized but not synchronized next time extend our extensive Extensive but not Extended next implement our implements ah Implements But not implement import our imports Imports are imports. Imports but not the imports. Import but not imports. Next time.

Here do you know? C-O-N-S-T. C-O-N-S-T but not constant. Here while spelling, while pronouncing we can use constant.

But C-O-N-S-T but not C-O-N-S-T-A-N-T. Are you getting? So make sure. Take all these things. Small small variations.

You have to identify. completed right strict fop but not strictly fp instance of but not instance of synchronized but not synchronized extends but not extend extends but not extend but not extend Next implements but not implement Import but not imports implement but not imports Take all Can I have you completed right? Next, you know from this total discussion, okay?

So, what possibility to ask the question for the exam? So, let me convert into bit style. Take a bit.

Which of the following list contains? Which of the following list contains? Only, which of the following list contains? Only.

Java reserved votes which of the following list contains only Java reserved votes which of the following list contains only Java reserved votes Java reserved reserved votes can you can I spell out which list contain only Java reserved votes ok take this one new delete first one new delete first list second Go to CON, go to constant, break, continue, return, exit, break, continue, return, exit, next up final, finally, finalize. Final finally finalize through throws a throne throne notify notify all if I if I implements extends imports Implements, extends, imports, size of, instance of, by chart int none of the above, by chart int none of the above, like. break continue return exit final finally finalize like sir can you tell among these have you have you observed right among these uh chalice contain only java reserved words first one second one third one yo huh chalice Do you know what is the problem with the first one? Delete is not there. Second one?

Constants. C-O-N-S-T but not C-O-N-S-T-A-N-T. Third one?

Exit is a method, not reserved word. Fourth one? Finalize is a method. Fifth one? Throw on.

Such type of terminology not there. Notify, notify all. These are methods but not keywords, but not reserved words.

Next one? Empty. Implements, Extents, Imports, Import but not Imports.

Next, SizeOf, not there in Java. InstanceOf is there but SizeOf is not there. InstanceOf, O is the capital, F is the capital.

Next, ByteShortInt, I can. tell that's why no list contains so none of the above is the correct answer okay none of the above if you want just observe sir which are various violations right now you can able to see are you getting it is a reserved word automatically it will come in blue color okay blue color is not there means these are those are not reserved words delete is not there c-o-n-s-t-a-n-t exit finalize the throne notify notify all imports size of instance of like these things so which list contain java reserved votes is nothing but no list okay this is so which one is the correct answer none of them right okay like next second one which of the following are which of the following are which of the following are java reserved votes which of the following are java reserved votes java reserved votes which are the following are java reserved votes java reserved votes at public static void public static void main string arcs public static void string arcs ah cannot tell among these which are valid java reserved votes public is a valid static is a valid void is a valid But the main is just name of the method not reserved word string is a name of predefined class Ox is name of variable. That's why first three public static void If you want you can see which things came in blue color public static void That's all string came in red color because it's a predefined class. That's it.

Okay. So these are data types I mean these are reserved reserved words, whatever there I hope But for the exam say all the 53 reserved words you people should memorize. Okay.

This is nothing easy easy way. So because we listed directly on the board. Okay. That's all.