Posts

Showing posts with the label Encapsulation in java

Advanced Java Programming

Image
                          Advanced Java Programming Advanced Java Programming :-   Introduction to advance java   As most of us already know that if we want to make normal applications it  can be easily built using core Java concepts. But, when it we need to develop web applications, advanced Java fundamentals, like JSP, Servlets, JDBC etc. needed, so to add capabilities and features of the application advance java is essential for developers. Through the motive of this blog is to explain about Advanced Java, I will be giving you a complete insight into the fundamental concepts of Advance Java. Figure - 1.2 If you want to see complete video on this please  have a look the video below.                              Learn with Resh u Advanced Java Programming Course ...

Encapsulation in java

Image
      Encapsulation in java Encapsulation The meaning of  Encapsulation , is to make sure that "sensitive" data is hidden from users. To achieve this, you must: declare class variables/attributes as  private provide public  get  and  set  methods to access and update the value of a  private  variable Get and Set You learned from the previous blogs that  private  variables can only be accessed within the same class (an outside class has no access to it). However, it is possible to access them if we provide public  get  and  set  methods. The  get  method returns the variable value, and the  set  method sets the value. Syntax for both is that they start with either  get  or  set , followed by the name of the variable, with the first letter in upper case: Example package com.encapsulation.examples; public class MyEncapsulation { ...

What is Java

Image
                                       What is Java In this post i will going to explain about what is java in general. I have explained Java features OOps concepts, and some basic knowledge of Java code. Please feel free to Like Share and Comments, You can always Subscribe my YouTube Channel and this Page as well in free to get more interesting videos...                Thanks for watching!!!!!                                         Recommended Posts: ·          Errors V/s Exceptions In Java ·         Built-in Exceptions in Java with examples ·         Using throw, catch and instanceof to handle Exceptions in J...

How to use static keyword in Java

Image
How to use static modifier in Java  There are some non-access modifiers to achieve many other functionalities in java. ·       The  static  modifier for creating class methods and variables. ·    The  final  modifier for finalizing the implementations of classes, methods, and variables. ·       The  abstract  modifier for creating abstract classes and methods. ·       The  synchronized  and  volatile  modifiers, which are used for threads. The Static Modifier Static Variables The static keyword is used to create variables that will exist independently of any instances created for the class. Only one copy of the static variable exists regardless of the number of instances of the class. Static variables are also known as class variables. Local variables cannot be declared static. Static Methods T...