Arjun Thakur has Published 1109 Articles

How do we set the text direction for the content in an element in HTML?

Arjun Thakur

Arjun Thakur

Updated on 03-Mar-2020 05:29:57

152 Views

Use the dir attribute in HTML, to set the text direction for the content in an element. You can try to run the following code to implement dir attribute −Example           This is demo text from left-to-right.       This is demo text from right-to-left.    

How do we display the visible width of a text area in HTML?

Arjun Thakur

Arjun Thakur

Updated on 03-Mar-2020 05:26:22

134 Views

Use the cols attribute in HTML to display the visible width of a textarea. You can try to run the following code to implement cols attribute −Example                    This is a demo paragraph. This is a demo paragraph.          This is a demo paragraph. This is a demo paragraph.          

How to start object-oriented programming in C++?

Arjun Thakur

Arjun Thakur

Updated on 02-Mar-2020 08:09:42

620 Views

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of attributes; and instructions to do things, in the form of methods.For example, a person is an object which has certain properties such as height, gender, age, etc. It also ... Read More

What are POD types in C++?

Arjun Thakur

Arjun Thakur

Updated on 02-Mar-2020 07:55:47

1K+ Views

POD is an acronym in C++ that means plain old data. It is a class/struct that ONLY has member variables and no methods, constructors, destructors, virtual functions, etc. For example, Example#include using namespace std; // POD struct MyStruct {     int key;     string data; }; int main() ... Read More

What is a string literal in C++?

Arjun Thakur

Arjun Thakur

Updated on 27-Feb-2020 05:08:03

386 Views

A string literal or anonymous string is a type of literal in programming for the representation of a string value within the source code. More simply put, a string literal is a bit of text between double quotes. For example, const char* var = "Hello";In this definition of var, "Hello" ... Read More

Java String toUpperCase() method example.

Arjun Thakur

Arjun Thakur

Updated on 26-Feb-2020 08:15:19

45 Views

This method has two variants. The first variant converts all of the characters in this String to upper case using the rules of the given Locale. This is equivalent to calling toUpperCase(Locale.getDefault()).The second variant takes a locale as an argument to be used while converting into upper case.ExampleLive Demoimport java.io.*; ... Read More

Java String intern() method example.

Arjun Thakur

Arjun Thakur

Updated on 26-Feb-2020 08:08:51

121 Views

The intern() method of the String class returns a canonical representation for the string object. It follows that for any two strings s and t, s.intern() == t.intern() is true if and only if s.equals(t) is true.ExampleLive Demoimport java.io.*; public class Test {    public static void main(String args[]) {   ... Read More

What does the compareTo do in Java?

Arjun Thakur

Arjun Thakur

Updated on 26-Feb-2020 07:07:03

117 Views

The compareTo() method in Java compares two strings lexicographically.ExampleLive Demopublic class Test {    public static void main(String args[]) {       String str1 = "Strings are immutable";       String str2 = new String("Strings are immutable");       String str3 = new String("Integers are not immutable"); ... Read More

Why StringBuffer is mutable in Java?

Arjun Thakur

Arjun Thakur

Updated on 26-Feb-2020 06:01:26

1K+ Views

We all know that the String class in Java is mutable i.e. once we create a String variable we cannot modify its data or do any manipulations.But, there may be scenarios where we need to modify the data of String variables. In such cases, we could use StringBuffer class.This class ... Read More

How to automatically redirect your visitors to your new home page?

Arjun Thakur

Arjun Thakur

Updated on 25-Feb-2020 06:49:25

2K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header ... Read More

Advertisements