Posts

JAVA ARCHITECTURE

Image
JAVA ARCHITECTURE The Java architecture defines the components that are essential to carry out the creation and execution of code written in the Java programming language. The various components of Java architecture are: Source file : Java is a robust programming language that enables developers to build a wide variety of applications for varying purposes. In order to write a Java programs or applications, you need to write certain codes. A java application contains the source code that enables an application to provide its desired functionalities. This source code saved in a source file with the extension .java. Class file : Once created a .java file is compiled to generate the .class file. A class file contains the bytecode that is generated by the compiler. Further, this class file can be executed by any machine that supports the Java Runtime Environment (JRE). JVM : The JVM is an application that is responsible for executing Java programs on a computer. It resides in the ...

IDENTIFYING THE FEATURES OF JAVA

IDENTIFYING THE FEATURES OF JAVA Java provides power features that make it popular and widely used programming language. Some of these features are: Simple : When an object of a class is created, memory needs to be allocated. Later on, when the object is no longer required, the allocated memory of the object should be released. In java, memory allocation and deallocation automatically. The process of allocation and deallocation of memory is called garbage collection. POINT: One of the major problem areas in most of object-oriented languages, such as C++, is to handle memory allocation. Programmers need to handle memory in the program explicitly for optimum utilization. To handle memory allocation, they use pointers that enable a program to refer to a memory location of the computer. However, java does not support pointers and consist of the built-in functionality to manage memory. Multithreaded : Java provides the concept of multithreading and allows a program to...

HOW TO SET PATH FOR JAVA

Image
HOW TO SET PATH FOR JAVA Checking the version of java in your System:- Open Run command using key Windows + R. The command prompt will appear and now type java –version you will see message and version of java like this:- For Setting Path:- In case of java we can set path in two ways:- Temporary path set:- For temporary path setting first open command prompt and enter the address of bin folder of java that is present in program files in your C: drive (Commonly). Here, cd is used for Change Directory. Using this, you will able to set path for java temporary means whenever you close the cmd path become disturbed. Permanent path set:- Open the properties of your Computer using My Properties. Click on Advanced system Open the Advanced Panel in it. Now, Click on Environment Variables . A Window will appear like this :-         Now Click on New (You can choose either one but if you are using multiple accounts then ch...

OOPs Concepts

Image
OOPS (Object Oriented Programming Structures) What is Abstraction? Abstraction is the concept of hiding irrelevant (not related to the task) details.In other words, make complex/typical system simple by hiding the unnecessary detail from the user and make it user-friendly. The abstract class specifies what functionality is provided but not how that functionality is provided. For example, one does not want to understand how the engine works. Similarly one does not have to understand the internal implementation of the software objects. Abstraction provides a way to hide the less essential properties so as to reduce complexity and increase efficiency. Abstraction Example: Engine and Driver. What is Encapsulation? Encapsulation is the technique of making the fields in a class private and providing access to the fields through public methods. Encapsulation is also called as data hiding. The benefits of encapsulation: The capability of changing\updating your code without di...

Creating of the stack using array

Image
//Creating of stack using ArrayStack #include<stdio.h> #include<conio.h> struct ArrayStack { int top, capacity; int *array; }; struct ArrayStack* createStack(int cap) { struct ArrayStack *stack; stack=malloc(sizeof(struct ArrayStack)); stack->top=-1; stack->capacity=cap; stack->array=malloc(sizeof(int)*stack->capacity); return(stack); } int IsFull(struct ArrayStack *stack) { if(stack->top==stack->capacity) return(1); else return(0); } int IsEmpty(struct ArrayStack *stack) { if(stack->top==-1) return(1); else return(0); } void Push(struct ArrayStack *stack,int item) { if(!IsFull(stack)) { stack->top++; stack->array[stack->top]=item; } } int Pop(struct ArrayStack *stack) { int item; if(!IsEmpty(stack)) { item=stack->array[stack->top]; stack->top--; return(item); } else return(-1); } main() { int choice, item, c; struct ArrayStack *stack; clrscr(); printf("\nEnter the capacity ...

Data types and keywords in JAVA

Image
DATA TYPES AND KEYWORDS IN JAVA Data types:- ·       A data type identifies all set of values (their representation in memory) and all the set of operations that transform these values into other values of that set it is called data types. ·       Java is a strongly typed language. Types:- ·       There are two types of data types- o   Primitive data types (int, char and so on) o   Users define data types (class etc.) Primitive type:- Type Size boolean Implementation dependent char 16 bits (stores Unicode) byte 8 bits short 16 bits int 32 bits long 64 bits float 32 bits double 64 bits Variables:- ·       It is a type of container which holds any data/information/value. ·       Every variable must...

Introduction Of JAVA

Image
INTRODUCTION OF CORE-JAVA Core JAVA Ø It is a breed of coffee. Ø Java developers want to think about name “oak” instead of java but it is already a name of anything. Ø Java was developed by James Gosling at SUN MICROSYSTEM, Inc. in 1982. Ø On Jan. 27, 2010 Sun was acquired by Oracle Corporation for US $7.4 billion. Ø Thus, Java is a product of Oracle. Ø Its World’s Popular and Secure language. Ø It is High level language. Ø Its works on 3 billion devices. Slogan of JAVA Ø      JAVA is everywhere. Ø      JAVA resides in mobiles, client machines, server machines, embedded devices, smart phones, cloud etc. Ø      It shares the same basic features of the language and libraries. Principle of JAVA Ø Write once, Run everywhere. What is Library? Ø      JAVA library is a collection of pre-defined classes. Flavors of JAVA Ø JAVA Standard Edition (SE) (...