## Stack Java Class – Explained

Earlier we saw about Stack and its implementation using Linked List. Java has a built in class for Stack. In this article we will discuss about it in detail. First brief about Stack. What...

Skip to content# Category: Java Concepts

## Stack Java Class – Explained

## Print Number with its Sign in Java

## Calculate Logn base r – Java Implementation

## Print My IP Address – Java Code

## Check if two Strings are equal without using built-in function – Java

## Java Pair Class

## Deque Implementation – Java

## Priority Queue in Data Structure

## Hash Table Implementation

@tutorialhorizon

Earlier we saw about Stack and its implementation using Linked List. Java has a built in class for Stack. In this article we will discuss about it in detail. First brief about Stack. What...

Sometimes we need to print the numbers with its sign irrespective of number is positive (+) or negative(-). Example: X = 5, print = +5 Y = -8, print = -8 Say we need...

Objective: Given a number n and r, write a program to calculate Logrn Example: N = 32, r =2 Log232= 5 N = 64, r = 4 Log464= 3 Approach: Without using built-In function-...

Objective: Write a java program to print your IP address. Approach: Get the local host address of your system using getLocalHost() method. Use getHostAddress() method to get the IP address from local host address. Code:Run This Code...

Objective– Given two strings, find out if they are equal or not without using any built-in function (without using equals() function in java). Example: String x=’tutorial’ and String y=’tutorial’ are equal – true String...

Class Pair<Key, Value> – A convenience class to represent name-value pairs. pair stores a key-pair value. Two Pair objects are considered equal if key and value of one pair is matching with second key....

Java Deque Interface – It’s a linear collection. The Deque interface is a subtype of the util.Queue interface. Deque is acronym of “Double Ended Queue” means it supports insertion and removal of data from both...

Earlier in we have seen Min-Heap and Max-Heap Implementation. Priority Queue is its built-in implementation in Java. In this article we will see how to perform Min-Heap and Max-Heap using Priority Queue. Brief: A...

Objective : To implement a Hash Table Input: A set of pairs of keys and values Approach: Create a Hash Table Hashtable<Integer, String> ht = new Hashtable<Integer, String>(); Insert values in hash table using...

%d bloggers like this: