How to write Immutable object in Java ?
The main property of immutable object is that the state of the immutable object can not be modified once created . Hence to make an object ...
Posted by Admin on
Four Tablet Puzzle
There are four tablets among which there are 2 pairs of two different type of tablet .But you can't differentiate between four tablets...
Posted by Admin on
Ebay Interview Solution Set -1
Round 1 Q1. Let us assume there are 3 baskets with different number of balls say p,q and r. Every ball has a number written on it...
Posted by Admin on
Postfix Evaluation
Write a program for Postfix Evaluation using Stack ? For example if we have an expression 432*+5- then it should return 5. Algorithm : ...
Posted by Admin on
View in database
What is View in database ? Why do we need to create View ? A view is virtual table which is created from one or many tables which depends ...
Posted by Admin on
Mutex vs Semaphore
Difference between Mutex and Semaphore Mutex: Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When...
Posted by Admin on
Kernel , Monolithic Kernel and Microkernel
What is kernel ? Explain the different types of kernel ? Kernel is the main component of the operating system.It is a bridge between appl...
Posted by Admin on
Balancing of Brackets in Expression(Application of Stack)
Que : Write a program for checking balancing of brackets in expression. For example : If expression is [{()}] then it should return true. ...
Posted by Admin on
Count the number of nodes in a binary search tree
Que :-Write a program to count the number of nodes in a binary tree. For example if we have the following tree , then it must return 5. ...
Posted by Admin on
Storage Classes in C
Auto Storage Class 1. Auto variables are declared in the function in which they are to be utilized. For example : void function1 () ...
Posted by Admin on
Reverse a string using pointer in C
void reverse ( char * str) { char * begin = str; while (*str) { str++; } char ...
Posted by Admin on
Different Anamolies in Database
Without normalization, it become difficult to handle and update the database without facing data loss. Insertion , Updation and Deletion An...
Posted by Admin on
Wild Pointer , NULL Pointer , Generic Pointer and Dangling Pointer in C
Wild pointer: A pointer in c which has not been initialized is known as wild pointer. Example: # include<stdio.h> int main(){ ...
Posted by Admin on
Print "Hello World " without semicolon
How will you print “Hello World” without semicolon? There can be many ways. One of them is following. #include<stdio.h> int mai...
Posted by Admin on
Trigger and Procedure in database
What is a Trigger? A Trigger is a stored procedure that is associated with insert, update or delete operations. The code is executed autom...
Posted by Admin on
Difference between Primary key and Unique Constraints
What is the difference between primary key and unique constraints? Both primary key and unique key enforces uniqueness of the column on w...
Posted by Admin on
Given a calculator that only has the + operator. How would you implement *,-,/.
Multiplication ( * ) operation We can add the first number, second number of times. Say i=4, j=5; //Run a for loop for 5 times(j), add...
Posted by Admin on
Memory leak
What is memory leak ? In computer science, a memory leak occurs when a computer program incorrectly manages memory allocations. When Dy...
Posted by Admin on
Widening(Up Casting) and Narrow(Down Casting) Conversion in Java
Q: - What are the two type of Conversion in Java and UP Casting , Down Casting? When the automatic conversion takes place then it is know...
Posted by Admin on
Public static void main() based question in Java
Q. Why main function is defined as public and static? Ans:- Public access specifier is specified so that the program wud be visible outsid...
Posted by Admin on
Explain JVM , JRE , JIT , JDK in detail.
JDK (Java Development Kit) :- IT contains Java Compiler , Debugger , libraries , bundling and deployment tools. It contains all the tools ...
Posted by Admin on
Why is Java so Secure and Platform independent language ?
Answer is byte code . Java is first compiled into byte code which is intermediate language between machine code and source code . This by...
Posted by Admin on
Difference between Multiprogramming , Multitasking , Multiprocessing and Multithreading Operating System
Multiprogramming In multiprogramming more than one program reside in the main memory. When one job is unable to execute because of I/O o...
Posted by Admin on
Efficient Binomial Coefficient
Write a function that takes two parameters n and k and returns the value of Binomial Coefficient C(n, k). For example:- if k=8 , n= 2 resul...
Posted by Admin on
Difference between String, StringBuilder and StringBuffer in Java
String String Builder String Buffer Immutable Mutable Mutable Synchronised(thread saf...
Posted by Admin on
Subscribe to:
Posts (Atom)