Pages

Monday, August 29, 2016

C Program for Multi Queue

Program-

// c program for multi Queue
#include<stdio.h>
#define MAX 10

struct s
{
int queue[10];
int rear,front;

}red,green,blue;

void insert(int);
void del(int);
void show();


void main()
{

int ch;
int temp;
red.rear=green.rear=blue.rear=0;
red.front=green.front=blue.front=0;

do
{
printf("\n\t Main menu");
printf("\n 1:Insert in red");
printf("\n 2:Insert in green");
printf("\n 3:Insert in blue");
printf("\n 4:Delete From red");
printf("\n 5:Delete From green");
printf("\n 6:Delete From blue");
printf("\n 7:Show");
printf("\n 8:Exit");
printf("\n Enter Your Choice ");
scanf("%d",&ch);
switch(ch)
{
case 1: insert(1); break;
case 2: insert(2); break;
case 3: insert(3); break;
case 4: del(4); break;
case 5: del(5); break;
case 6: del(6); break;
case 7: show(); break;
case 8: temp=1; break;
default: printf("\n wrong choice");
}
}while(ch!=8 && temp!=1);
}

void insert(int no)
{
int item;
if(no==1)
{
if(red.rear==MAX)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
red.queue[red.rear]=item;
red.rear++;
}
}
if(no==2)
{
if(green.rear==MAX)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
green.queue[green.rear]=item;
green.rear++;
}
}
if(no==3)
{
if(blue.rear==MAX)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
blue.queue[blue.rear]=item;
blue.rear++;
}
}
}

void del(int no)
{
int item,i;
if(no==4)
{
if(red.front==red.rear)
printf("\n Underflow");
else
{
item=red.queue[red.front];
printf("\n Deleted element is %d",item);
red.front++;
}
}
if(no==5)
{
if(green.front==green.rear)
printf("\n Underflow");
else
{
item=green.queue[green.front];
printf("\n Deleted element is %d",item);
green.front++;
}
}
if(no==6)
{
if(blue.front==blue.rear)
printf("\n Underflow");
else
{
item=blue.queue[blue.front];
printf("\n Deleted element is %d",item);
blue.front++;
}
}
}

void show()
{
int i;
if(red.front==red.rear)
printf("\n red queue is empty");
else
{
printf("\n Elements of Red queue are \n");
for(i=red.front;i<red.rear;i++)
{
printf("%d\t",red.queue[i]);
}
}

if(green.front==green.rear)
printf("\n green queue is empty");
else
{
printf("\n Elements of green queue are \n");
for(i=green.front;i<green.rear;i++)
{
printf("%d\t",green.queue[i]);
}
}


if(blue.front==blue.rear)
printf("\n blue queue is empty");
else
{
printf("\n Elements of blue queue are \n");
for(i=blue.front;i<blue.rear;i++)
{
printf("%d\t",blue.queue[i]);
}
}
}


Output-


         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 1

 Enter the value 10

         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 1

 Enter the value 20

         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 1

 Enter the value 30

         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 2

 Enter the value 100

         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 2

 Enter the value 200

         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 7

 Elements of Red queue are
10      20      30
 Elements of green queue are
100     200
 blue queue is empty
         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 4

 Deleted element is 10
         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
 Enter Your Choice 7

 Elements of Red queue are
20      30
 Elements of green queue are
100     200
 blue queue is empty
         Main menu
 1:Insert in red
 2:Insert in green
 3:Insert in blue
 4:Delete From red
 5:Delete From green
 6:Delete From blue
 7:Show
 8:Exit
Enter Your Choice 8

C Program for Multi Stack

Program-

//Implementation of Multi Stack
#include<stdio.h>
#define MAX 10

struct s
{
 int stack[10];
 int top;
}red,green,blue;

void push(int);
void pop(int);
void show();


void main()
{
int ch;
red.top=green.top=blue.top=-1;
int temp;
do
{
printf("\n\t Main menu");
printf("\n 1:Push red");
printf("\n 2:Push green");
printf("\n 3:Push blue");
printf("\n 4:Pop red");
printf("\n 5:Pop green");
printf("\n 6:Pop blue");
printf("\n 7:Show");
printf("\n 8:Exit");
printf("\n Enter Your Choice ");
scanf("%d",&ch);
switch(ch)
{
case 1: push(1); break;
case 2: push(2); break;
case 3: push(3); break;
case 4: pop(4); break;
case 5: pop(5); break;
case 6: pop(6); break;
case 7: show(); break;
case 8: temp=1; break;
default: printf("\n wrong choice");
}
}while(ch!=8 && temp!=1);
}

void push(int no)
{
int item;
if(no==1)
{

if(red.top==MAX-1)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
red.top++;
red.stack[red.top]=item;
}
}

if(no==2)
{

if(green.top==MAX-1)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
green.top++;
green.stack[green.top]=item;
}
}

if(no==3)
{

if(blue.top==MAX-1)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
blue.top++;
blue.stack[blue.top]=item;
}
}
}

void pop(int no)
{
int item;

if(no==4)
{

if(red.top==-1)
printf("\n Underflow");
else
{
item=red.stack[red.top];
printf("\n Deleted element is %d",item);
red.top--;
}
}
if(no==5)
{

if(green.top==-1)
printf("\n Underflow");
else
{
item=green.stack[green.top];
printf("\n Deleted element is %d",item);
green.top--;
}
}
if(no==6)
{

if(blue.top==-1)
printf("\n Underflow");
else
{
item=blue.stack[blue.top];
printf("\n Deleted element is %d",item);
blue.top--;
}
}
}

void show()
{
int i;

if(red.top==-1)
printf("\n red stack is empty");
else
{
printf("\n Elements of Red stack are \n");
for(i=0;i<=red.top;i++)
{
printf("%d\t",red.stack[i]);
}
}

if(green.top==-1)
printf("\n green stack is empty");
else
{
printf("\n Elements of green stack are \n");
for(i=0;i<=green.top;i++)
{
printf("%d\t",green.stack[i]);
}
}

if(blue.top==-1)
printf("\n blue stack is empty");
else
{
printf("\n Elements of blue stack are \n");
for(i=0;i<=blue.top;i++)
{
printf("%d\t",blue.stack[i]);
}
}
}

Output-


         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 1

 Enter the value 10

         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 1

 Enter the value 20

         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 1

 Enter the value 30

         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 2

 Enter the value 100

         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 2

 Enter the value 200

         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 7

 Elements of Red stack are
10      20      30
 Elements of green stack are
100     200
 blue stack is empty
         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 4

 Deleted element is 30
         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
 Enter Your Choice 7

 Elements of Red stack are
10      20
 Elements of green stack are
100     200
 blue stack is empty
         Main menu
 1:Push red
 2:Push green
 3:Push blue
 4:Pop red
 5:Pop green
 6:Pop blue
 7:Show
 8:Exit
Enter Your Choice 8

Thursday, August 11, 2016

C Program for Linked List With all Operations

Program:-

// C Program for Linked List With all Operations
  #include<stdio.h>
#include<stdlib.h>
struct link
{
int info;
struct link * next;
};
struct link * start=NULL;

void insertFirst();
void insertLast();
void insertPos();
void show();
void delFirst();
void delLast();
void delPos();

void main()
{
int ch,temp;
do
{
printf("\n\t Main menu");
printf("\n 1:insert at first");
printf("\n 2:insert at last");
printf("\n 3:insert at Specific Position");
printf("\n 4:Delete from First");
printf("\n 5:Delete from Last");
printf("\n 6:Delete from Specific Position");
printf("\n 7:Show");
printf("\n 8:Exit");
printf("\n Enter Your Choice ");
scanf("%d",&ch);
switch(ch)
{
case 1: insertFirst(); break;
case 2: insertLast(); break;
case 3: insertPos(); break;
case 4: delFirst(); break;
case 5: delLast(); break;
case 6: delPos(); break;
case 7: show(); break;
case 8: temp=1; break;
default: printf("\n wrong choice");
}
}while(ch!=8 && temp!=1);
}

void insertFirst()
{
struct link * temp;
int num;
temp=(struct link *)malloc(sizeof(struct link));
printf("Enter the number\n");
scanf("%d",&num);
temp->info=num;
temp->next=start;
start=temp;
}


void insertLast()
{
struct link * temp,* move;
int num;
temp=(struct link *)malloc(sizeof(struct link));
printf("Enter the number\n");
scanf("%d",&num);
temp->info=num;
temp->next=NULL;
if(start==NULL)
start=temp;
else
{
move=start;
while(move->next!=NULL)
{
move=move->next;
}
move->next=temp;
}
}

void insertPos()
{
struct link * temp,* move,* back;
int num,pos,i;
temp=(struct link *)malloc(sizeof(struct link));
printf("Enter the Position to Insert The no.\n");
scanf("%d",&pos);
printf("Enter the number\n");
scanf("%d",&num);
temp->info=num;
temp->next=NULL;
if(start==NULL)
start=temp;
else
{
move=start;
for(i=0;i<pos-1;i++)
{
back=move;
move=move->next;
}
temp->next=back->next;
back->next=temp;

}
}


void delFirst()
{
struct link * move;
int item;
if(start==NULL)
printf("link list is empty");
else
{
item=start->info;
start=start->next;
printf("item deleted=%d",item);
}
}


void delLast()
{
struct link * back,* move;
int item;
if(start==NULL)
printf("link list is empty");
else
{
move=start;
if(move->next==NULL)
{
item=move->info;
start=NULL;
}
else
{

while(move->next!=NULL)
{
back=move;
move=move->next;
}
item=move->info;
back->next=NULL;
}
printf("item deleted=%d",item);
}
}

void delPos()
{
struct link * move,* back;
int num,pos,i;

printf("Enter the Position From which to Delete The no.\n");
scanf("%d",&pos);
if(start==NULL)
printf("list is empty");
else
{
move=start;
for(i=0;i<pos-1;i++)
{
back=move;
move=move->next;
}

num=move->info;
back->next=move->next;
printf("item deleted=%d",num);
}
}


void show()
{
struct link * temp,* move;

if(start==NULL)
printf("list is empty");
else
{
move=start;
printf("Elements are ");
while(move->next!=NULL)
{
printf("%d ",move->info);
move=move->next;
}
printf("%d\n",move->info);
}

}



Output:-

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 2
Enter the number
10

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 2
Enter the number
20

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 2
Enter the number
30

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 7
Elements are 10 20 30

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 1
Enter the number
40

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 7
Elements are 40 10 20 30

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 3
Enter the Position to Insert The no.
3
Enter the number
50

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 7
Elements are 40 10 50 20 30

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 4
item deleted=40
Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 7
Elements are 10 50 20 30

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 5
item deleted=30
Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 7
Elements are 10 50 20

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 6
Enter the Position From which to Delete The no.
2
item deleted=50
Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 7
Elements are 10 20

Main menu
 1:insert at first
 2:insert at last
 3:insert at Specific Position
 4:Delete from First
 5:Delete from Last
 6:Delete from Specific Position
 7:Show
 8:Exit
 Enter Your Choice 8

C Program for Stack using linked list

Program:-

//C Program for Stack using linked list

#include<stdio.h>
#include<stdlib.h>
struct link
{
int info;
struct link * next;
};
struct link * start=NULL;

void insert();
void show();
void del();

void main()
{
int ch,temp;
do
{
printf("\n\t Main menu");
printf("\n 1:insert");
printf("\n 2:delete");
printf("\n 3:Show");
printf("\n 4:Exit");
printf("\n Enter Your Choice ");
scanf("%d",&ch);
switch(ch)
{
case 1: insert(); break;
case 2: del(); break;
case 3: show(); break;
case 4: temp=1; break;
default: printf("\n wrong choice");
}
}while(ch!=4 && temp!=1);
}

void insert()
{
struct link * temp,* move;
int num;
temp=(struct link *)malloc(sizeof(struct link));
printf("Enter the number\n");
scanf("%d",&num);
temp->info=num;
temp->next=NULL;
if(start==NULL)
start=temp;
else
{
move=start;
while(move->next!=NULL)
{
move=move->next;
}
move->next=temp;
}
}

void del()
{
struct link * back,* move;
int item;
if(start==NULL)
printf("link list is empty");
else
{
move=start;
if(move->next==NULL)
{
item=move->info;
start=NULL;
}
else
{
while(move->next!=NULL)
{
back=move;
move=move->next;
}
item=move->info;
back->next=NULL;
}
printf("item deleted=%d",item);
}
}

void show()
{
struct link * temp,* move;
if(start==NULL)
printf("list is empty");
else
{
move=start;
printf("Elements are ");
while(move->next!=NULL)
{
printf("%d\n",move->info);
move=move->next;
}
printf("%d\n",move->info);
}

}


Output:-



Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 1
Enter the number
10

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 1
Enter the number
20

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 1
Enter the number
30

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 3
Elements are 10
20
30

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 2
item deleted=30
Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 3
Elements are 10
20

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 4


C Program for Queue using array

Program:-


// C program for Queue
#include<stdio.h>
#define MAX 10
int queue[10];
int rear,front;
void main()
{
int ch;
int temp;
void insert();
void del();
void show();
rear=0;
front=0;
do
{
printf("\n\t Main menu");
printf("\n 1:insert");
printf("\n 2:delete");
printf("\n 3:Show");
printf("\n 4:Exit");
printf("\n Enter Your Choice ");
scanf("%d",&ch);
switch(ch)
{
case 1: insert(); break;
case 2: del(); break;
case 3: show(); break;
case 4: temp=1; break;
default: printf("\n wrong choice");
}
}while(ch!=4 && temp!=1);
}

void insert()
{
int item;
if(rear==MAX)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
queue[rear]=item;
rear++;
}
}

void del()
{
int item,i;
if(front==rear)
printf("\n Underflow");
else
{
item=queue[front];
printf("\n Deleted element is %d",item);
front++;
}
}

void show()
{
int i;
if(front==rear)
printf("\n queue is empty");
else
{
printf("\n Elements of queue are \n");
for(i=front;i<rear;i++)
{
printf("%d\t",queue[i]);
}
}
}


Output:-


Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 1

 Enter the value 10

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 1

 Enter the value 20

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 1

 Enter the value 30

Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 3

 Elements of queue are
10      20      30
Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 2

 Deleted element is 10
Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 3

 Elements of queue are
20      30
Main menu
 1:insert
 2:delete
 3:Show
 4:Exit
 Enter Your Choice 4

C Program for stack using array

Program:-

//Implementation of Stack using Array
#include<stdio.h>
#define MAX 10
int stack[10];
void push();
void pop();
void show();
int top;

void main()
{
int ch;
top=-1;
int temp;
do
{
printf("\n\t Main menu");
printf("\n 1:Insert");
printf("\n 2:Delete");
printf("\n 3:Show");
printf("\n 4:Exit");
printf("\n Enter Your Choice ");
scanf("%d",&ch);
switch(ch)
{
case 1: push(); break;
case 2: pop(); break;
case 3: show(); break;
case 4: temp=1; break;
default: printf("\n wrong choice");
}
}while(ch!=4 && temp!=1);
}

void push()
{
int item;
if(top==MAX-1)
printf("\n overflow");
else
{
printf("\n Enter the value ");
scanf("%d",&item);
top++;
stack[top]=item;
}
}

void pop()
{
int item;
if(top==-1)
printf("\n Underflow");
else
{
item=stack[top];
printf("\n Deleted element is %d",item);
top--;
}
}

void show()
{
int i;
if(top==-1)
printf("\n stack is empty");
else
{
printf("\n Elements of stack are \n");
for(i=0;i<=top;i++)
{
printf("%d\t",stack[i]);
}
}
}


Output:-



Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
 Enter Your Choice 1

 Enter the value 10

Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
 Enter Your Choice 1

 Enter the value 20

Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
 Enter Your Choice 1

 Enter the value 30

Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
 Enter Your Choice 3

 Elements of stack are
10      20      30
Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
 Enter Your Choice 2

 Deleted element is 30
Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
 Enter Your Choice 3

 Elements of stack are
10      20
Main menu
 1:Insert
 2:Delete
 3:Show
 4:Exit
Enter Your Choice 4

Wednesday, August 3, 2016

JAVA FEATURES

JAVA FEATURES
Simple:-
Java is simple in the sense that, syntax is based on C++ (so easier for programmers to learn it after C++).removed many confusing and/or rarely-used features e.g., explicit pointers, operator overloading etc. No need to remove unreferenced objects because there is Automatic Garbage Collection in java.


Object-oriented:-
Object-oriented means we organize our software as a combination of different types of objects that incorporates both data and behaviour. Object-oriented programming (OOPs) is a methodology that simplifies software development and maintenance by providing some rules.
“Java is an object-oriented language, which means that you focus on the data in your application and methods that manipulate that data, rather than thinking strictly in terms of procedures.
 In an object-oriented system, a class is a collection of data and methods that operate on that data. Taken together, the data and methods describe the state and behaviour of an object.”
Basic concepts of OOPs are:-
Object Class, Inheritance, Polymorphism, Abstraction, and Encapsulation.


Platform Independent:-
A platform is the hardware or software environment in which a program runs. There are two types of platforms software-based and hardware-based. Java provides software-based platform. The Java platform differs from most other platforms in the sense that it's a software-based platform that runs on top of other hardware-based platforms.
It has two components:-
Runtime Environment, API (Application Programming Interface)
Java code can be run on multiple platforms e.g. Windows, Linux, Sun Solaris, and Mac/OS etc. Java code is compiled by the compiler and converted into byte code. This byte code is a platform independent code because it can be run on multiple platforms i.e. Write Once and Run Anywhere (WORA).


Secured:-
Java does not use memory pointers explicitly. All the programs in java are run under an area known as the sand box. Security manager determines the accessibility options of a class like reading and writing a file to the local disk. Java uses the public key encryption system to allow the java applications to transmit over the internet in the secure encrypted form. The byte code Verifier checks the classes after loading. 
These securities are provided by java language. Some security can also be provided by application developer through SSL, JAAS, cryptography etc.


Robust:-
Robust simply means strong. Java uses strong memory management. There is lack of pointers that avoids security problem. There is automatic garbage collection in java. There is exception handling and type checking mechanism in java. All these points make java robust.
Architecture-neutral:-
Compiler generates byte codes, which have nothing to do with particular computer architecture, easy to interpret on any machine


Portable:-
The feature Write-once-run-anywhere makes the java language portable provided that the system must have interpreter for the JVM. Java also has the standard data size irrespective of operating system or the processor. These features make the java as a portable language


High-performance:-
Java uses native code usage, and lightweight process called threads. In the beginning interpretation of byte code resulted the performance slow but the advance version of JVM uses the adaptive and just in time compilation technique that improves the performance.
Distributed:-
“The widely used protocols like HTTP and FTP are developed in java. Internet programmers can call functions on these protocols and can get access the files from any remote machine on the internet rather than writing codes on their local system.”
We can create distributed applications in java. RMI and EJB are used for creating distributed applications. We may access files by calling the methods from any machine on the internet.


Multi-threaded:-
A thread is like a separate program, executing concurrently. We can write Java programs that deal with many tasks at once by defining multiple threads. The main advantage of multi-threading is that it shares the same memory. Threads are important for multi-media, Web applications etc.


Dynamic:-

While executing the java program the user can get the required files dynamically from a local drive or from a computer thousands of miles away from the user just by connecting with the Internet.