Paul Richard has Published 66 Articles

Append a single character to a string or char array in java?

Paul Richard

Paul Richard

Updated on 26-Feb-2020 06:04:55

2K+ Views

The append() method in the StringBuffer class adds the specified String to the contents of the current String buffer. Using this method you can append a single character to a string or char array in java.Examplepublic class Test {    public static void main(String args[]) {       StringBuffer ... Read More

What does the method firstElement() do in java?

Paul Richard

Paul Richard

Updated on 25-Feb-2020 10:09:47

152 Views

The firstElement() method is used to return the first component (the item at index 0) of this vector.Exampleimport java.util.Vector; public class VectorDemo {    public static void main(String[] args) {       Vector vec = new Vector(4);       vec.add(4);       vec.add(3);       vec.add(2); ... Read More

What does the method elements() do in java?

Paul Richard

Paul Richard

Updated on 25-Feb-2020 10:04:48

168 Views

The elements() method is used to return an enumeration of the components of this vector. The returned Enumeration object will generate all items in this vector at the similar index location.Exampleimport java.util.Vector; public class VectorDemo {    public static void main(String[] args) {             Vector ... Read More

What does the method search(Object o) do in java?

Paul Richard

Paul Richard

Updated on 25-Feb-2020 09:59:50

439 Views

The search(Object o) method is used to return the 1-based position where an object is on this stack.Exampleimport java.util.*; public class StackDemo {    public static void main(String args[])  {             Stack st = new Stack();       st.push("Java");       st.push("Source");   ... Read More

What are favicon best practices regarding size and format?

Paul Richard

Paul Richard

Updated on 25-Feb-2020 06:36:21

4K+ Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size.The size of a favicon is 16x16 since it also gets displayed next to the URL of your site in a browser's address bar. It is visible ... Read More

How to count the number of words in a text file using Java?

Paul Richard

Paul Richard

Updated on 20-Feb-2020 05:11:12

6K+ Views

Read the number of words in text fileCreate a FileInputStream object by passing the required file (object) as a parameter to its constructor.Read the contents of the file using the read() method into a byte array. Insatiate a String class by passing the byte array to its constructor.Using split() method read the words of the String ... Read More

How to extract certain substring from a string using Java?

Paul Richard

Paul Richard

Updated on 20-Feb-2020 04:48:30

10K+ Views

You can extract a substring from a String using the substring() method of the String class to this method you need to pass the start and end indexes of the required substring.ExampleLive Demopublic class Substring {    public static void main(String args[]) {       String str = ... Read More

Extracting data from SAP HANA database and load to ORACLE database

Paul Richard

Paul Richard

Updated on 14-Feb-2020 05:38:34

875 Views

There is a number of ways you can achieve this. Here are few of the methods to do the same.a) There are many standard tools in SAP by use of which you can extract the data and also automate the whole process. With the use of an ETL tool, this ... Read More

How to Edit, Compile, and Execute a C++ Program?

Paul Richard

Paul Richard

Updated on 10-Feb-2020 13:01:28

2K+ Views

Create a new cpp file using your text editor. Enter the following in it −#include int main() {     std::cout

What is C++ programming language?

Paul Richard

Paul Richard

Updated on 10-Feb-2020 10:58:50

5K+ Views

C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ ... Read More

Advertisements