Java Articles

Page 440 of 450

Regex named groups in Java

George John
George John
Updated on 30-Jul-2019 333 Views

Java Regex Capturing Groups

Read More

Regular Expressions syntax in Java Regex

Jai Janardhan
Jai Janardhan
Updated on 30-Jul-2019 318 Views

Following is a simple program demonstrating how to use regular expression in Java. Java Regex Characters

Read More

What is the package for String Class in Java?

Jai Janardhan
Jai Janardhan
Updated on 30-Jul-2019 5K+ Views

String class belongs to the java.lang package.

Read More

Is StringBuffer final in Java?

Anjana
Anjana
Updated on 30-Jul-2019 774 Views

Yes, StringBuffer class is final Java. We cannot override this class.

Read More

Why we do not import a package while we use any string function?

Sai Nath
Sai Nath
Updated on 30-Jul-2019 982 Views

The String class belongs to the java.lang package. This is the default package of the Java language therefore it is not mandatory to import it to use its classes.

Read More

Immutable String in Java

Sai Nath
Sai Nath
Updated on 30-Jul-2019 825 Views

In Java immutable objects are those whose data can’t be changed or modified (once modified). String class is immutable i.e. once we create a String object its data cannot be modified.

Read More

What is the difference between Java and Core Java?

radhakrishna
radhakrishna
Updated on 30-Jul-2019 1K+ Views

Java is a programming language, whereas Core Java is a computing platform. Java Platform Standard Edition is Core Java, which is also called Java SE. The following are the computing following supported by Java, which also has Core Java as its part:Java SE Java Standard Edition used to develop desktop applications. A well-known implementation of Java SE is the Java Development Kit (JDK).Java EE Java Enterprise Edition i.e. Java 2 Platform, Enterprise Edition or J2EE. Java EE is used for applications running on servers. Java ME Java Micro Edition is used for applications running on mobile phones.Java SE is the Standard Edition and also ...

Read More

Can a Vector contain heterogeneous objects in Java?

Ramu Prasad
Ramu Prasad
Updated on 30-Jul-2019 1K+ Views

Since a vector stores elements in the form of objects, you can store objects of various types (heterogeneous) in it.Example:import java.util.*; class Demo{} public class VectorSample {    public static void main(String args[]) {       Demo obj = new Demo();       Vector v = new Vector(3, 2);       System.out.println("Initial size: " + v.size());       System.out.println("Initial capacity: " + v.capacity());       v.addElement(new Integer(1));       v.addElement(new String("krishna"));       v.addElement(new Float(3.5f));       v.addElement(obj);       System.out.println("Capacity after four additions: " + v.capacity());    } }

Read More

What does the method add(E element) do in java?

Nikitha N
Nikitha N
Updated on 30-Jul-2019 512 Views

The add(E e) method of the java.util.ArrayList class appends the specified element E to the end of the list.Example:import java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) {       ArrayList arrlist = new ArrayList(5);       arrlist.add(15);       arrlist.add(20);       arrlist.add(25);       for (Integer number : arrlist) {          System.out.println("Number = " + number);       }    } }Output:Number = 15 Number = 20 Number = 25

Read More
Showing 4391–4400 of 4,495 articles
« Prev 1 438 439 440 441 442 450 Next »
Advertisements