In most of the java interviews, the interviewer used to ask the basic implementation of the Java Stack operations along with its applications like checking the parenthesis string is balanced or not, Java string postfix to prefix expression using a stack, Java string prefix to postfix expression using a stack, etc. So, here is the post named as “Java Program to check the balanced parenthesis using Stack Algorithm” which contains both the basic Stack class implementation with all its operations […]
Programming
Why is String Immutable and final in Java?
Why is String Immutable and final in Java? It is one of the most important question asked in an Interview with freshers or with the experienced candidates for the Java Developer. Well, as a Java Developer we all know that there might be any application we had ever made without using the String data type. Almost every application uses String in it that too every application creates too many String objects. So, now we will know why the string is designed in […]
Java Stack Implementation using Linked List
Java Stack Implementation using Linked List: In the last post, we learned Java Stack Implementation using Array. Here is the post which explains the implementation of the most useful data structure i.e. Stack using Linked List. First of all, we need to know what actually Stack is and what is its basic operations? So, let’s know about Stack. Stack: A Stack is an abstract data type that follows a certain principle/rule for its set of operations i.e. insertion, deletion, search, etc. The […]
Java Stack Implementation using Array
Java Stack Implementation using Array: Here is the post which explains the implementation of the most useful data structure i.e. Stack using Array. First of all, we need to know what actually Stack is and what is its basic operations? So, let’s know about Stack. Stack: A Stack is an abstract data type that follows a certain principle/rule for its set of operations i.e. insertion, deletion, search, etc. The principle followed by the stack is commonly known as LIFO (Last In First […]
System.ArrayCopy Method in Java with Example
Today we will discuss about the topic: System.ArrayCopy Method in Java with Example from our Java experts. The arraycopy( ) method is present in java.lang.System package. The arraycopy() method is mainly used to copy quickly an array of any type from one place to another. This is much better and faster approach than the equivalent loop in Java. The following is the declaration of arraycopy( ) method in java.lang.System:
1 | public static native void arraycopy(Object src, int srcPos, Object dest, int destPos, int length); |
The above declaration demonstrates the following points: The arraycopy( ) method is […]
JavaScript Variables: Declaration and their Scopes
“The basis of programming is to define the data and then manipulate the defined data.” This statement defines that every programming language requires data to be processed. There is nothing in programming without the data. So, JavaScript also defines their data using the variables. Here is the post from our experts on the topic: “JavaScript Variables: Declaration and their Scopes” where we will see different ways of declaring JavaScript variables and their scopes. This topic seems to be very simple, but there […]