Java Articles

Page 443 of 450

Constructors of StringBuilder class in Java.

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 432 Views

The StringBuilder class of the java.lang package is a mutable sequence of characters. This provides an API compatible with StringBuffer, but with no guarantee of synchronization. Following are the list of constructors provided by the StringBuilder class.S.N.Constructor & Description1StringBuilder()This constructs a string builder with no characters in it and an initial capacity of 16 characters.2StringBuilder(CharSequence seq)This constructs a string builder that contains the same characters as the specified CharSequence.3StringBuilder(int capacity)This constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.4StringBuilder(String str)This constructs a string builder initialized to the contents of the specified string. ...

Read More

Difference between StringBuffer and StringBuilder.

Akshaya Akki
Akshaya Akki
Updated on 30-Jul-2019 1K+ Views

The StringBuffer and StringBuilder classes are used when there is a necessity to make a lot of modifications to Strings of characters.Unlike Strings, objects of type StringBuffer and String builder can be modified over and over again without leaving behind a lot of new unused objects.The StringBuilder class was introduced as of Java 5 and the main difference between the StringBuffer and StringBuilder is that StringBuilder’s methods are not thread safe (not synchronized).It is recommended to use StringBuilder whenever possible because it is faster than StringBuffer. However, if the thread safety is necessary, the best option is StringBuffer objects.

Read More

Constructors of StringTokenizer class in Java.

Anjana
Anjana
Updated on 30-Jul-2019 298 Views

Following are the important constructors of the StringTokenizer class.Sr.No.Constructor & Description1StringTokenizer(String str)This constructor a string tokenizer for the specified string.2StringTokenizer(String str, String delim)This constructor constructs string tokenizer for the specified string.3StringTokenizer(String str, String delim, boolean returnDelims)This constructor constructs a string tokenizer for the specified string.

Read More

Accessing an SAP endpoint in apex code

Ali
Ali
Updated on 30-Jul-2019 258 Views

I faced a similar issue earlier but it was because of a bug in JAVA security package (refer link for more details)http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7044060I just got updated myself to latest OpenJDK7 and it solved my issue. I think you can try the same and check if it helps.

Read More

What are the prerequisites for learning Java?

vanithasree
vanithasree
Updated on 30-Jul-2019 2K+ Views

In fact, you can directly start learning Java without any prior knowledge of programming language. But, the syntax in Java is similar to the syntax of the C programming language, therefore, Knowing C language helps to get hold of Java quickly. Having introduced to object-oriented principles before starting Java, also helps in the understanding of the language so, having an idea on object-oriented languages such as C++ also helps. In short, if you know C or C++ it will be a little bit easier to cope with Java technology.

Read More

What is meant by Java being platform-independent?

vanithasree
vanithasree
Updated on 30-Jul-2019 454 Views

When you compile Java programs using javac compiler it generates bytecode. We need to execute this bytecode using JVM (Java Virtual machine) Then, JVM translates the Java bytecode to machine understandable code.You can download JVM’s (comes along with JDK or JRE) suitable to your operating system and, once you write a Java program you can run it on any system using JVM.

Read More

What are the platforms that support Java programming language?

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

Java runs on operating systems such as Windows, Mac OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc.

Read More

What is meant by Java being a dynamic language?

Giri Raju
Giri Raju
Updated on 30-Jul-2019 3K+ Views

Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run-time information that can be used to verify and resolve accesses to objects at run-time.

Read More

What is Java API and what is its use?

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

The full form of API is Application Programming Interface. It is a document which gives you the list of all the packages, classes, and interfaces, along with their fields and methods.Using these API’s, the programmer can know how to use the methods, fields, classes, interfaces provided by Java libraries.

Read More

Are identifiers hello and Hello same in Java?

varun
varun
Updated on 30-Jul-2019 394 Views

Identifiers in Java are case-sensitive, therefore, hello and Hello are considered as two different identifiers.

Read More
Showing 4421–4430 of 4,498 articles
« Prev 1 441 442 443 444 445 450 Next »
Advertisements