Java Articles

Page 440 of 450

Difference between declaring a variable before or in a Java loop.

Giri Raju
Giri Raju
Updated on 30-Jul-2019 175 Views

Performance wise, there is hardly any difference. But it is good to keep a variable local to the scope it is used. So declaring a variable inside Java loop is generally preferred.

Read More

How to concatenate byte array in java?

mkotla
mkotla
Updated on 30-Jul-2019 3K+ Views

You ByteArrayOutputStream to write byte arrays and get the result using its toByteArray() method.import java.io.ByteArrayOutputStream; import java.io.IOException; public class Tester { public static void main(String[] args) throws IOException { byte[] a = { 1,2,3}; byte[] b = { 4,5,6}; ByteArrayOutputStream baos = new ByteArrayOutputStream(); baos.write(a); baos.write(b); byte[] c = baos.toByteArray(); for(int i=0; i< c.length ; i++){ System.out.print(c[i] +" "); } } }Output1 2 3 4 5 6

Read More

Why java is both compiled and interpreted language.

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

Yes, a java program is first compiled into bytecode which JRE can understand. ByteCode is then interpreted by the JVM making it as interpreted language.

Read More

Regex named groups in Java

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

Java Regex Capturing Groups

Read More

Regular Expressions syntax in Java Regex

Jai Janardhan
Jai Janardhan
Updated on 30-Jul-2019 319 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 776 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 984 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 827 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
Showing 4391–4400 of 4,498 articles
« Prev 1 438 439 440 441 442 450 Next »
Advertisements