Before you understand code you will hate it, once you understand it, you will enjoy speaking it.
@FaithBiete7 жыл бұрын
I am stuck with class in Java. I know that basic but this getin function is complicated
@glowmate38097 жыл бұрын
Steve, honestly FUCK YOURSELF
@vita213.6 жыл бұрын
Spot on Steve
@user-lp5us4id2d6 жыл бұрын
Ya u r true! Coding is so addictive once you understand it
@confidoplaysfx5 жыл бұрын
Faith Biete man ty for this quote ,it’s hard for me to put effort into this java class but this will definitely help🙌🏾
@stevenkasuba62075 жыл бұрын
just learnt something i never understood all through out my programming life in the university .thank you
@swatkowski095 жыл бұрын
Make sure you change the batteries on your smoke detectors.
@vananhle-bacquelot48324 жыл бұрын
I am curious to know what this quote really mean? Sorry if it might be a silly question.
@vananhle-bacquelot48324 жыл бұрын
I am curious to know what this quote really mean? Sorry if it might be a silly question.
@Gamerboy-gl7di4 жыл бұрын
@@vananhle-bacquelot4832 ok no problem
@NoorAlam-xe8it4 жыл бұрын
Actually I think he smokes while shooting video
@jacquelinecahill18278 жыл бұрын
I watched some of your C++ videos (until I found out I was in the wrong class) and this is the first time using this for java. You do a great job making it simple for beginners. Thanks a ton...you have been a great help for me.
@Metalist21505 жыл бұрын
Thank you for this. Only halfway through the video, and already drawn more knowledge from it than the hour(s) I spent trying to learn objects on docs. Great explanation of why you use getters & setters, encapsulation and whatnot. Thank you, this is gold
@shaifnachiya47299 жыл бұрын
You are super duper awesome. You really made me to understand and how to build from the basic. Each and every videos are filled with golden keys. Thank You
@abdel52448 жыл бұрын
i clicked on an Ad , hope that could benefit you in some way ;) Thanks for the tutorial.
@robertreimann18468 жыл бұрын
Good job :D
@nethmal12044 жыл бұрын
very good :)
@happyfishjj7 жыл бұрын
After all these years, I finally understood why do we need to use the keyword this. Thank you very much!
@umerfs73668 жыл бұрын
The whole reason to generate those getters and setters was to make your instance variables private, and you didn't do just that. private int id; private String name; private int age; is the way to go. (In your Student class.)
@maXImuS96838 жыл бұрын
constructive criticism. important information. thanks.
@britninja59695 жыл бұрын
I don't know if you still on YT, but could you elaborate on your suggestion? Should I instead of Getting and Setting just put the private infront of the datatypes or how would it work, bc if I just "add" private infront of id and String it tells me that Student.name etc. is not visible....
@justsmell35 жыл бұрын
@@britninja5969 No he is saying the point of adding the getters and setters is so your variables can be private. So make your variables private AND use the getters and setters. This way, the variable can only be accessed the way you intend them to be.
@johnsnowkumar3594 жыл бұрын
@@maXImuS9683 Author of article probably didn't want to confuse non - hard core programmers. He wanted to avoid confusing people by bringing in more concepts such as private at this stage.Umer is obviously a more knowledgeable or even probably a hard core programmer.
@gabrielalbino8625 жыл бұрын
Very clear explanations. You've clarified my doubts about objects and classes in java, and in particuler the use of getters and setters to encapsulate data. Thank you, Sir. May God bless you in this endeavor!
@kotshifotshi7394 жыл бұрын
Really helpful and clear, you make everything very simple Thanks aloooot
@78423471859 жыл бұрын
Awesome explanation Bro...I have seen many videos on getter and setters but i never understand how it works. But this video was lifesaver. Thank you so much bro.
@Just1MorePerson18 жыл бұрын
I love you man you make this so easy to understand
@dksharktooth9 жыл бұрын
Good tutorials. Use 1.5x speed if he's going to slow for you.
@theSagarM8 жыл бұрын
getters and setters are preferred because this way you can keep the *variables* private (makes application more secure), and set or get the values by using public methods.
@Jukeboxpunk17 жыл бұрын
Sagar Mishra you can just make get as public not the set because anyone can set the value of your variables
@Hikkbcfhn5 жыл бұрын
you are a great tutor , cleared my confusions by showing the difference between the two codes and explained it very well!! thank you
@SmartProgramming6 жыл бұрын
its very simple to understand from your tutorials sir, specially practical work, great 👍👍
@fidgetspinner14035 жыл бұрын
Can you please do a similar tutorial where we can use arrays and taking inputs of the students int, name and age and to also be able to assign a desired number of students? This would be awesome. Keep up the great work. You make things easy to understand. So much easier than my teacher at university.
@heathicus22346 жыл бұрын
thank you so much! I will pass my test tomorrow thanks to you :))
@Kiviro8 жыл бұрын
i am also a beginner and i am study from eclipses as i am following him
@rajanlurrey4 жыл бұрын
You are really awesome man
@alexschmidt43715 жыл бұрын
6:54 syso control + shift It is not working for me, how is it done? Edit: I found out that I can type syso and press Control + Shift + Space at the same time.
@DJABA5 жыл бұрын
Control + Space is the shortcut :)
@alexschmidt43715 жыл бұрын
@@DJABA Yeah it seemed to be changed via new updates releases thanks mate
@silasdietrich74644 жыл бұрын
@@alexschmidt4371 try typing the letters 'sout' and then enter (should be the first option)
@alexschmidt43714 жыл бұрын
@@silasdietrich7464 Oh, I forgot about this comment. However, I already found the solution it was syso then Control + Shift + Space. Thank you for your help I will consider editing the comment.
@sabysreya8 жыл бұрын
Very nice work and kudos for teaching us the core topics in easy way. way to go!
@quitbycode7894 жыл бұрын
This is such a helpful tutorial on classes and objects! Love it! No better feeling than helping people learn :)
@therock84084 жыл бұрын
Hey I am a beginner in programming ...should I follow this course or should I need to learn c or cplus plus ...please guide me bro
@abhishekmatta65398 жыл бұрын
how does getter and setters protect from data corruption please explain? a programmer can change id, age,name in both the cases u have shown
@FaithBiete7 жыл бұрын
Yes I really want to know this
@Jukeboxpunk17 жыл бұрын
abhishek mahtta he forgot to mention the access specifiers for instance variables + set methods to private and get and set as public
@Jukeboxpunk17 жыл бұрын
abhishek mahtta these ide development tools make things easier to layout code but fir in depth study best guide is documentation
@abhishekmatta65397 жыл бұрын
THANks bros for supporting
@jakethesnake5654 жыл бұрын
if it wasn't for these videos, ide be struggling in my computer science class. Thank you for the awesome content
@gradyhodge85175 жыл бұрын
Excellent, brief, and clear. Good Job! I'll be searching for more of your videos.
@onthatilemabe73004 жыл бұрын
my teacher doesnt teach so im here for help! THANK YOU!!
@andy601334 жыл бұрын
Thanks for the video i understood this by yr video otherwise i was badly confused...
@leonardofabio22817 жыл бұрын
Buenas noches, el video fue muy sencillo y bien explicado, gracias por aportar tu conocimiento y experiencia. Desde Venezuela.
@gamingclips21734 жыл бұрын
Really good tutorial go to 2x speed if he's going too slow because that's what I use and it's just brilliant
@milankbudha4 жыл бұрын
thank u very much..it was very helpful and so easy to understand..
@chrisjameson20013 жыл бұрын
Thanks I understand it just a little bit better now.
@Nop13377 жыл бұрын
thx man! it really helps me to understand class and object in java. keep it up the good work!
@makunzinyalunga58529 жыл бұрын
TX, nice & easy to follow, when are you doing the advanced part of Java i.e. Networking, Database and etc.
@pavneetsidhu945510 жыл бұрын
Keep on going dude! these really helped.
@KevinMThomas8 жыл бұрын
I agree with +Michael Saneke can you create a tutorial for creating an address book GUI with a table you can sort by field and add, delete, sort, search, etc? Without using Eclipse only a text editor?
@vinu00516 жыл бұрын
Sir, U have shown the use of getter and setter methods. My query is can we get input from user for id, name and age using scanner object in one class and call the methods in second class which has main method. Thanks in advance.
@kenishajones480110 жыл бұрын
This was very helpful!Thank you!!
@kiranpotluri5 жыл бұрын
Good explanation my friend. I did a 2X speed guys, if he is teaching for beginners
@jamilhfl6 жыл бұрын
Good Java learning tutorial.
@bogdan-dm.76275 жыл бұрын
In the class declaration, you need to add "private" before variable declaration so they cannot be accessed. The way you showed in the video they are still accessible by unwanted users.
@DJABA5 жыл бұрын
You need constructors if you use a private class. He'll cover it later I guess?
@govindmishra9108 жыл бұрын
Hatts off bro.....Appreciate ur work ...Thanx alot for it
@fhdhejeh634 жыл бұрын
So Basically we create a separate class and we declare some attributes there. Then we call this sub class into the main one, assign to it an object and then call the attributes of the subclass to each object?
@SoldierGirl68W5 жыл бұрын
This has been tremendously helpful, thank you so much! If I were to do this using notepad since my college class requires us to not use a compiler, when I create separate classes, are they separate notepad files that I just put in the same folder? Thanks so much!
@thomaslinssen14266 жыл бұрын
Great explanation. Thank you.
@mchinnayya7 жыл бұрын
Sir I am getting error by - student canot be resolved to a type, please help me.
@markolorenzodelgado40513 жыл бұрын
thanks for the explanation!
@naralaarchana84807 жыл бұрын
Very easy to understand tqq u so much sir
@StormWolfET6 жыл бұрын
Thank you very much, super helpful video
@alenadmitruk64137 жыл бұрын
I think you are teacher from God☝👏
@sivagamasundari80179 жыл бұрын
Hi..Its a set of very useful lectures...I would like to know how data corruption is avoided here with getters and setters because here also we are trying to hard code inside set method in myclass.java?..forgive me if this is juvenile as i am trying to learn java
@avinashrachamadugu6478 жыл бұрын
Sivagama Sundari . He meant that data type of the instance variable cannot be changed. You can make the instance variables PRIVATE from PUBLIC and you can use getter,setter methods to access them.
@HindiRiddlesForFun5 жыл бұрын
mark is not the object or instance it is refrence variable which carries the refrence id of the object ::)
@josemunguia56607 жыл бұрын
GREAT VIDEOS! THANKS!
@Ladoaarna7 жыл бұрын
Is Getters and setters can be done with normal command prompt
@Sara-s-playground5 жыл бұрын
thanks, but which of these classes is testclass here??
@venkatmohith82417 жыл бұрын
sir,if we havent use getters and setters in the student class..they cant be used in my class?
@rjvnz8 жыл бұрын
Hi, thank you for this wonderful video. I was so confused trying to understand classes using textbooks and this was gold. Just a quick question: Shouldn't tom.setId(2)? In your video, tom.setId(1) which I'm guessing will override Mark's id?
@aagg54108 жыл бұрын
+rjvnz yes it should be tom.setId(2)
@Moz318 жыл бұрын
It won't override though, theyll just have same ID
@FUM805 жыл бұрын
dude put a new battery in smoke detector
@Prathm072 жыл бұрын
Can we create Object outside the main method ?
@chetanmotghare76572 жыл бұрын
some people dont like indian accent. but here enjoying the video
@danimajor51106 жыл бұрын
i use jgrasp... when i try to call the getter method in the main i get errors "saying value not found" for the .getName and .getAge methods even though they are in my Student class. Any help?
@ArkoSarkar16 жыл бұрын
Can someone explain why is it important to go the getters and setters way rather than accessing the values directly?
@nicmaoury68228 жыл бұрын
Why not make the field variables private?
@TheGamingGamerGames5 жыл бұрын
Thank you for the assistance
@vkgamer51297 жыл бұрын
Easy!!! Thanks.
@jain34846 жыл бұрын
Thank you!
@aakashbhargava12767 жыл бұрын
Please Sir, Suggest me correct code for this program .I faced execution error in this code package Calculation; import java.util.Scanner; public class Calculator { static char choice; static int a1, b2 , ad, sb, ml, dv,pr; public static void main(String[] args) { System.out.println("Enter first number"); Scanner num1 = new Scanner(System.in); a1 = num1.nextInt(); System.out.println("Enter sevond number"); Scanner num2 = new Scanner(System.in); b2 = num2.nextInt(); System.out.println("Enter + for addition"); System.out.println("Enter - for subtraction"); System.out.println("Enter * for multiply"); System.out.println("Enter ÷ for division"); System.out.println("Enter # for clear screen"); System.out.println("Enter % for percentage"); System.out.println("Enter calculation choice"); Scanner scan = new Scanner(System.in); choice = scan.next().charAt(0); switch(choice){ case '+': addition ad1 = new addition(); ad = ad1.Add(a1 , b2 ); System.out.println("addition is" +ad); break; case '-':subtraction sb2 = new subtraction(); sb = sb2.Sub(a1 , b2); System.out.println("Subtraction is"+sb); break; case '*': multiplication mul3 = new multiplication(); ml = mul3.Mul(a1, b2); System.out.println("Multiplition is" +ml); break; case '÷': division dv4 = new division(); dv = dv4.Div(a1,b2); System.out.println("Division is" +dv); break; case '%': percentage pr5 = new percentage(); pr= pr5.Per(a1, b2); System.out.println("percentage is" +pr); break; } } }
@rajat.lazyme8 жыл бұрын
I am facing a problem....... When i am trying to import any variable from a class it show me a error like id is a variable so it is showing "id cannot be resolved or is not a field."......... Hep me Thanks
@saptangshumanna99196 жыл бұрын
You could have used private variables after using getters and setters
@sargonmarqos54359 жыл бұрын
thank you ... really helpful :)
@anilchoundaj14458 жыл бұрын
Thanks a lot
@amanbagrecha6 жыл бұрын
is it similar to structures in c?
@nalineeable7 жыл бұрын
sir please provide tutorial for struts and hibernate
@pavanbodkhe7865 Жыл бұрын
sir but can we do this all thing in the single class
@uxzh7 жыл бұрын
In Netbeans 8 i am getting an error with my strings "Colour is erroneous" for example. Can someone help
@nazrulhasanalam96334 жыл бұрын
sugoi desu
@muntazirm17944 жыл бұрын
Sugoi sugoi
@nazrulhasanalam96334 жыл бұрын
@@muntazirm1794 wakarimashta
@stephena.olujare65125 жыл бұрын
I'm beginner, but i still don't comprehend how he explain the "Method Overloading" tutorial.
@georgemwongela64728 жыл бұрын
Thank you
@ObaidMasood8 жыл бұрын
good tutorial
@masouddayaghi59235 жыл бұрын
wonderful video but this detectors are really annoying
@anandgupta85296 жыл бұрын
you have told that using getter and setter u can secure your data ,but u don't have told how it is doing that. Please focus on logics also
@WINTHEGOLD7 жыл бұрын
hi all while writing code after giving dot after mark in the pop up box id name are not coming .can anyone help me to resolve this issue. I am new to java.Thanks
@maxg708 жыл бұрын
I still dont understand why we need encapsulation and how somebody can corrupt the data if int id;String name;int age still existing in the class?
@muhammetaliariturk21158 жыл бұрын
hiya, When i try to setName,id,age with scanner. Id and Age works but for name ; it didnt want me to type a name ! and say " "; " is 2 years old"; thank u
@vinothbabu1289 жыл бұрын
Good
@iqrazaman81083 жыл бұрын
Yh wala program agr written mh likhy ...toh kasy likhy gy...bcz yh alg classes hai 2
@chadcausey327 жыл бұрын
Can someone explain which part is missed with protecting your data. Which ones should have been private?
@JHEVR7 жыл бұрын
why did he have it on public?
@shaiksameemacosmotology6398 жыл бұрын
ITS NOT GETTING AN output ..its saying student cannot be resolved into a type
@meixiongpeng14605 жыл бұрын
Whos here before the CMSC 131 final?
@vipin_mishra197 жыл бұрын
how i can create class inside main class using notepad .......
@ashutoshanand40406 жыл бұрын
Is it inheritance ?
@jonathanselnes23178 жыл бұрын
get rid of that piping sound, please :P
@swatkowski095 жыл бұрын
Needs to change batteries on his smoke detector lol
@banugaria9677 жыл бұрын
dont we have to have Private instances on other class then its worth to setters and getters there.
@jalajgupta39307 жыл бұрын
why do we use the word "NEW" and what is use of that
@kamalalrashdi43594 жыл бұрын
what is the use of new????
@stanislavdimitrov1643 Жыл бұрын
OK, but I think that it is better to write the Set and Get methods yourself instead of automatically generating them. So, you can learn things better.
@SrinadhYuva5 жыл бұрын
Can we use Scanner class ???
@SrinadhYuva5 жыл бұрын
An error is thrown when I've used scanner class
@saptangshumanna99196 жыл бұрын
Listen to this in 0.25 speed...... It's so funny🤣🤣
@shraboniroy80986 жыл бұрын
Saptangshu Manna so true! 😂😂
@nuranferzeli51075 жыл бұрын
your acces modifier must be private for use setter getter methods