Log In to start Learning

Login via

Post By Admin Last Updated At 2020-06-15
Setup Path in Java
Setup Path in JavaFor compilation and execution of a program we must need to install a JDK according to the current versions of java in the windows. Though the properties in environment variables.
  • Go to the my computers then right click
  • Select a properties and environment variables
  • Then go to advanced options and set the path
  • For example: ‘c:\WINDOWS\SYSTEM2;C:\Program Files\java\jdk\bin’
Java EditorsTo write a java program we need a one text editor, so following are Notepad, Eclipse, Net beans are used.Oops in java: Java is an object oriented programming language.
  1. Encapsulation: It is a process of binding variables and methods in to a single entity .By using encapsulation we can improve maintenance and reduced the time required for debugging.
  2. Inheritance: It is process of acquiring the members from one class to another class. Using inheritance we can achieve reusability, we can write the code multiple times and reducing code size.
  3. Polymorphism: A Single entity which can show multiple behaviours and many forms achieve the flexibility.
Method over loading it is a process of specifying multiple methods having different signature but having same method name is called method over loading.

JAVA Tutorial Video

[embed]https://www.youtube.com/watch?v=Mb8nG-NH6gg [/embed]Method Signature:They are 4 types of signatures in a method contains
  • Method name
  • Number of Parameters
  • Type of Parameters
  • Order of Parameter
A Class contain any number of method but every method must have different signature ,no two methods have same signature.Method Over riding: This Process of specifying two methods having same signature and same return type in two different classes having IS-A relationship.One method should be Parent class and other should be in child class.
  1. Abstraction: The information that is hiding the data and showing functionality
Abstract class contain some abstract methods then the class is called abstract class. It is a combination of abstract and concrete methods and cannot be instantiated .we cannot create an object of abstract class and therefore we cannot access the members of that class.Abstract Method:  A method contains only declaration and does not have any definition then it is abstract method. An abstract method must end with “ ; “ and it must be declared with abstract keyword.ExamplePublic abstract class Graphic Object {// declare fields// declare non abstract methodsAbstract void draw ( );} Interface: An interface is a collection of abstract methods. Interface will be used as a contract or an agreement for developing the software. The Interface will be given by clients. Syntax:interface  InterfaceName{VariablesMethods}Data Types:The data type will represent what type of data we store in to memory. The data types in java language are classified into three types
  • Primitive data types
  • Derived data types
  • User defined data types
In java language, the primitive data types are also called as fundamental data types. The java language contains 8 primitive data types classified into 4 categories.Integer data type category used for storing numbers either positive or negative without decimal point like byte, short, int, long.Floating point category used for storing numbers either positive or negative with a decimal point like float, double.Character category used for storing for single character like char and Boolean category for storing a value is either true or false.