Arraylist add element at specific index

package com.instanceofjavaforus; import java.util.ArrayList;   public class AddElementAtSpecifiedIndex {       public static void main(String[] args) {          //create an ArrayList object         ArrayList arrayList... read more ?

String vs stringbuffer vs stringbuilder

1.Definition: String is an immutable sequence of characters. StringBuffer is mutable sequence of characters. StringBuilder is also mutable sequence of characters. (adsbygoogle = window.adsbygoogle || []).push({}); The only... read more ?

StringBuffer class in java

(adsbygoogle = window.adsbygoogle || []).push({}); StringBuffer is a thread safe, mutable sequence of characters. A StringBuffer is like a String , but can be modified in the same... read more ?

Print 1 to 10 without using loop in java?

 Basically to display numbers from 1 to 10 or a series we will use for , while or do while loop So here is the programs to do... read more ?

Programming Questions on Static

1. what is the output of following program: package com.instanceofjavaforus;   public class StaticDemo{        static {           i=10;     }       static  ... read more ?

Type Casting in java?

upcasting

Type Casting: Type casting means to explicitly convert one type of data to another type of data.  Type casting has 2 types: Upcasting Downcasting Upcasting: Converting lower type... read more ?

Select Menu