Posts

Installing MySQL(5.7) on MacOS (Monterey)

Image
Using Home-brew : Use these commands in sequence to install MySQL(5.7) on MacOS(Monterey) We are aiming to install mysql version 5.7. If homebrew is not installed on your system then follow this step 1, to check whether hombrew installed or check execute step 2.  Step: 1   -   /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Step: 2 - brew -v  Step: 3 - brew info mysql  Step: 4 - brew info mysql@5.7 Step: 5 - brew install mysql@5.7 (installation ) if got something like this     then try this solution : MySQL Error Solution Step: 6 -  echo 'export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc  Step: 7  -  now  re-start your terminal. Step: 8  -  mysql_secure_installation  For all the further questions opt for “yes” Step: 9 - mysql -u root -p  now use your MySQL knowledge to implement Database Stop service: >> brew services stop mysql@5.7 List services:   >> brew service

Static and Dynamic Memory Allocation in JAVA

In JAVA the class contains two types of things within it which are                                                                1. Data Members                        2. Member Functions or Methods Since Data Members represent the properties of the objects and the Methods or functions within a class represent the behavior of the object of class type.     object is the entity which can have the Data Members and Methods of the class . lets consider we have a class which is as follow:                         class  Student{                                 String name;                                      int roll_no;                                      int percentage;                          static char batch;                               void getStudentDetails( )                               {                                 // body;                                }                                                           void showStudentDetails( )      

Objects and Classes In JAVA

Image
Object:-                 In real world scenario there exist different type of objects, basically objects are the thing which have some properties and some behaviors.        like a smartphone, a smartphone is the object which have different properties and behaviors , a smartphone have properties like its color, manufacturer, RAM size, ROM, processor etc. and the behavior of smartphones are calling, net surfing, calculation, data storage etc.         we can take an another example of an object. We take a scenario of an Employee. An employee is the object which has some properties like his name, age , company name, salary ,department etc . it can have behaviors too like production, how employee work, work over projects , growth of employee in the company, employee's work rate etc.             Like policeman is an object , A policeman have properties like his name, age, department, and work place and his behaviors is investigation, finding thieves, bring him to court etc.

Variables and Datatypes in JAVA

Image
Variable :-           V ariables are just a name given to a particular memory location, where it can store the data. Variables are just like label which points to a memory location. This memory location is used to hold the data or store the data.    Examples:-                           int num;                        char mchar;                                    float denum;                               boolean tf_result; Here in the above examples,                       num, mchar, denum,  tf_result represents the name of the variables. and int, char, float, boolean defines the type of data these respective variables contains. Any memory location in computer can be accessed by using two things which are given below:                          1. Name of the location (Variable Name)                               2. Address of the memory location   In former programming to JAVA , like in C and C++ there is use of pointers to access the memory location. Using pointers t

Difference between JDK, JRE, JVM and JIT

Image
Pupils are generally confused about JDK, JRE, JVM and JIT in JAVA. The below given explanation is quite better to understand these terminologies properly. 1. JVM:-     JVM is the virtual machine which can execute the byte code. JVM is the platform dependent code while byte code is platform independent code. So there exist different JVM for different operating system. The below diagram can explain how the JVM is used to execute the java Byte Code. for to know more about JVM visit the link:  JVM Explanation and working 2. JIT:-       JIT is the Just In Time compiler. It analyses the whole code and analyses the code which is used again and again. it convert those classes to specific machine code faster processing. It can identify the code which is being used again and again and then place them in cache memory. when JVM needs these code for execution then it will catch the code from cache memory. so it makes the execution faster. That is why JAVA is faster than other pro

Why JAVA Important and used mostly for Software Development

Image
Why JAVA is important and why it is used mostly in Software Development JAVA language is used widely in software development and it is considered very important language for the sake of Software Development and Web Applications Development. JAVA have so many features which makes it amazing and wonderful and some of them are explained below and which are the major features due to which JAVA is best programming language: JAVA follows Object Oriented Programming approach to solve a particular problem. Which makes use of Objects, Classes and PIE. PIE symbolize Polymorphism, Inheritance and Encapsulation. JAVA is a platform independent language which does not depends upon the configuration of Operating System and hardware. A JAVA program which is written on any system configuration can be run on any other system having different configuration of Operating System and hardware. JAVA makes use of Byte Code. Which is an encoded in a specific machine readable language tha

JAVA VIRTUAL MACHINE (JVM)

Image
JVM (Java Virtual Machine) JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent).JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. What is JVM It is: A specification  where working of Java Virtual Machine is specified. But implementation provider is independent to choose the algorithm. Its implementation has been provided by Sun and other companies. An implementation  Its implementation is known as JRE (Java Runtime Environment). Runtime Instance  Whenever you write java command on the command prompt to run the java class, an instance of JVM is created. What it does The JVM performs following operation: Loads code Verifies code Executes code Provides runtime environment JVM provides definitions for the: Memory area Class file format Register set Garbage-collected heap Fatal error reporting etc. Let's understan