Differences Between Bootstrap and jQuery UI

Mahesh Parahar
Updated on 24-Feb-2020 11:32:00

1K+ Views

Both bootstrap and jquery are used in web development and primarily for the frontend development. As code of bootstrap and jquery majorly executed at client end so also responsible for style and look and feel of the UI.Mostly every application is being developed on two platforms i.e backend and frontend in which backend is developed by high level language such as JAVA, DOT NET etc. while frontend has been developed by client end language such as BOOTSTRAP, JQUERY etc.Following are the important differences between Bootstrap and JQuerySr. No.KeyBootstrapJQuery1DefinitionBootstrap is basically a framework developed by Twitter used for frontend web development ... Read More

Differences Between Black Box Testing and White Box Testing

Mahesh Parahar
Updated on 24-Feb-2020 11:27:48

1K+ Views

As we know that testing is the most important stage in the process of delivery of any application or software as it is only testing which not only validate the quality of an application but also provides an opportunity to the developer to improve its product.Every application is being developed in some high or low level language which means some code has been written for its development so on the basis of knowledge to the tester about the application there is classification of testing namely Black Box Testing and White Box Testing.Following are the important differences between Black Box Testing ... Read More

OutOfMemoryError in Java: Steps to Find Root Cause

raja
Updated on 24-Feb-2020 11:27:10

2K+ Views

The OutOfMemoryError is thrown by JVM, when JVM does not have enough available memory, to allocate. OutOfMemoryError falls into the Error category in Exception class hierarchy.To generate OutOfMemoryErrorWe will allocate a large chunk of memory, which will exhaust heap memory storage.We will keep on allocating the memory and point will reach, when JVM will not have enough memory to allocate, then OutOfMemoryError will be thrown.Once we will catch the OutOfMemory error, we can log the error.ExampleLive Demopublic class OutOfMemoryErrorDemo {    public static void main(String[] args) throws Exception {       int dummyArraySize = 15;       System.out.println("Max JVM memory: " + Runtime.getRuntime().maxMemory()); ... Read More

Difference Between var and dynamic in C#

Mahesh Parahar
Updated on 24-Feb-2020 11:25:58

6K+ Views

As we know that programming in any language get starts with declaration a variable after which its definition and logic implementation take place. So it is one of the most important factors to know that how to declare variable in any programming language before starts coding in it.Now if we take an instance of C# language there is change in declaration in variable with the advancement in the language. As in former version of C# all the code written was validated at the compile time itself which made it as Static typed language where variables are getting declared using var ... Read More

Print Byte Array in Java

seetha
Updated on 24-Feb-2020 11:18:02

18K+ Views

You can simply iterate the byte array and print the byte using System.out.println() method.Examplepublic class Tester {    public static void main(String[] args) {       byte[] a = { 1,2,3};       for(int i=0; i< a.length ; i++) {          System.out.print(a[i] +" ");       }    } }Output1 2 3

Shuffle a 2D Array in Java Correctly

vanithasree
Updated on 24-Feb-2020 11:17:13

2K+ Views

Yes. Create a list to represent a 2D array and then use Collections.shuffle(list).Exampleimport java.util.ArrayList; import java.util.Collections; import java.util.List; public class Tester {    public static void main(String[] args) {       List rows = new ArrayList();       rows.add(new int[]{1,2,3});       rows.add(new int[]{4,5,6});       rows.add(new int[]{7,8,9});       System.out.println("Before Shuffle");       System.out.println("[0][0] : " + rows.get(0)[0]);       System.out.println("[1][1] : " + rows.get(1)[1]);       System.out.println("After Shuffle");       Collections.shuffle(rows);       System.out.println("[0][0] : " + rows.get(0)[0]);       System.out.println("[1][1] : " + rows.get(1)[1]);    } }OutputBefore Shuffle [0][0] : 1 [1][1] : 5 After Shuffle [0][0] : 7 [1][1] : 2

Initialize a Dynamic Array in Java

radhakrishna
Updated on 24-Feb-2020 11:16:20

625 Views

Following program shows how to initialize an array declared earlier.Examplepublic class Tester {    int a[];    public static void main(String[] args) {       Tester tester = new Tester();       tester.initialize();    }    private void initialize() {       a = new int[3];       a[0] = 0;       a[1] = 1;       a[2] = 2;       for(int i=0; i< a.length ; i++) {          System.out.print(a[i] +" ");       }    } }Output0 1 2

Create a Dynamic 2D Array in Java

Giri Raju
Updated on 24-Feb-2020 11:15:24

3K+ Views

If you wish to create a dynamic 2d array in Java without using List. And only create a dynamic 2d array in Java with normal array then click the below linkYou can achieve the same using List. See the below program. You can have any number of rows or columns.Exampleimport java.util.ArrayList; import java.util.List; public class Tester {    public static void main(String[] args) {       List rows = new ArrayList();       rows.add(new int[]{1, 2, 3});       rows.add(new int[]{1, 2});       rows.add(new int[]{1});       //get element at row : 0, column ... Read More

Remove Element from Array in Java

Sreemaha
Updated on 24-Feb-2020 11:11:49

1K+ Views

Following example shows how to remove an element from array. Exampleimport java.util.ArrayList; public class Main {    public static void main(String[] args) {       ArrayList objArray = new ArrayList();       objArray.clear();       objArray.add(0,"0th element");       objArray.add(1,"1st element");       objArray.add(2,"2nd element");       System.out.println("Array before removing an element"+objArray);       objArray.remove(1);       objArray.remove("0th element");       System.out.println("Array after removing an element"+objArray);    } }OutputThe above code sample will produce the following result. Array before removing an element[0th element, 1st element, 2nd element] Array after removing an element[2nd element]

Empty an Array in Java

Rahul Sharma
Updated on 24-Feb-2020 11:10:47

5K+ Views

Use List.clear() method to empty an array.Exampleimport java.util.ArrayList; import java.util.List; public class Tester {    public static void main(String[] args) {       List list = new ArrayList();       list.add("A");       list.add("B");       list.add("C");       list.add("D");       list.add("E");       list.add("F");       list.add("G");       list.add("H");       System.out.println("Original List " + list);       list.clear();       System.out.println("Cleared List " + list);    } }OutputOriginal List [A, B, C, D, E, F, G, H] Cleared List []

Advertisements