Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Sravani S
Page 3 of 6
Set the font size with CSS
The font-size property in CSS controls the size of text in your web pages. You can specify font sizes using various units and keyword values to create visual hierarchy and improve readability. Syntax font-size: value; Font Size Values The font-size property accepts several types of values: Keywords: xx-small, x-small, small, medium, large, x-large, xx-large Relative keywords: smaller, larger Units: pixels (px), percentages (%), em, rem Example: Different Font Size Values Font Size Examples This font ...
Read MoreHow to use typeof with arguments in JavaScript?
The arguments object contains all parameters passed to a function. You can use typeof to check the data type of individual arguments or the arguments object itself. Understanding the arguments Object The arguments object is array-like and accessible within all functions. You can access individual arguments using bracket notation: arguments[0] // First argument arguments[1] // Second argument Using typeof with the arguments Object When you use typeof on the arguments object itself, it returns "object": function testArguments() ...
Read MoreHow JavaScript was created?
NCSA's Mosaic was the first popular browser, which released in 1993. After a year, in 1994, Netscape was founded, which came with the web browser Netscape Navigator. It gained a lot of popularity in the 1990s. Many Mosaic authors worked for Navigator. Considering the need for users and market trends, Netscape realized that the Web should be more dynamic. They needed a scripting language that could make web pages interactive and responsive to user actions. The Birth of JavaScript In 1995, Netscape hired Brendan Eich to implement Scheme in the browser. However, Netscape collaborated with Sun Microsystems ...
Read MoreLearning about SAP ABAP CDS views
SAP ABAP CDS Views (Core Data Services) are a powerful data modeling infrastructure that allows developers to define semantically rich data models directly in the database. CDS views enable advanced analytical processing and provide a foundation for SAP HANA and S/4HANA applications. Learning Resources Whether it is CDS or ABAP or anything pertaining to SAP, you can always find free courses on https://open.sap.com/ referred to as Open SAP. Besides this, there are lots of free resources available - just Google it ...
Read MoreHow to Split a String with Escaped Delimiters?
The split(String regex) method of the String class splits this string around matches of the given regular expression.Examplepublic class Sample{ public static void main(String args[]){ String s = "|A|BB||CCC|||"; String[] words = s.split("\|"); for (String string : words) { System.out.println(string); } } }OutputA BB CCC
Read MoreConstructor overloading in Java
Yes! Java supports constructor overloading. In constructor loading, we create multiple constructors with the same name but with different parameters types or with different no of parameters.Examplepublic class Tester { private String message; public Tester(){ message = "Hello World!"; } public Tester(String message){ this.message = message; } public String getMessage(){ return message ; } public void setMessage(String message){ this.message = message; } public static void main(String[] args) { Tester tester = new Tester(); System.out.println(tester.getMessage()); Tester tester1 = new Tester("Welcome"); System.out.println(tester1.getMessage()); } } OutputHello World! Welcome
Read MoreSearch and Replace with Java regular expressions
Java provides the java.util.regex package for pattern matching with regular expressions. Java regular expressions are very similar to the Perl programming language and very easy to learn.A regular expression is a special sequence of characters that help you match or find other strings or sets of strings, using a specialized syntax held in a pattern. They can be used to search, edit, or manipulate text and data.The replaceFirst() and replaceAll() methods replace the text that matches a given regular expression. As their names indicate, replaceFirst replaces the first occurrence, and replaceAll replaces all occurrences.Exampleimport java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexMatches { ...
Read MoreCan we define an interface inside a Java class?
Yes, you can define an interface inside a class and it is known as a nested interface. You can’t access a nested interface directly; you need to access (implement) the nested interface using the inner class or by using the name of the class holding this nested interface.Examplepublic class Sample { interface myInterface { void demo(); } class Inner implements myInterface { public void demo() { System.out.println("Welcome to Tutorialspoint"); } } public static void main(String args[]) { Inner obj = ...
Read MoreDoes Java support default parameter values for a method?
Java does not support the concept of default parameter however, you can achieve this usingMethod overloadingUsing method overloading if you define method with no arguments along with parametrized methods. Then you can call a method with zero arguments.Variable argumentsIn Java methods parameters accept arguments with three dots. These are known as variable arguments. Once you use variable arguments as a parameter method, while calling you can pass as many number of arguments to this method (variable number of arguments) or, you can simply call this method without passing any arguments.Examplepublic class Sample { void demoMethod(String... args) { ...
Read MoreWhat is the use of the \'&\' symbol in C++?
The & symbol is used as an operator in C++. It is used in 2 different places, one as a bitwise and operator and one as a pointer address of operator.Bitwise ANDThe bitwise AND operator (&) compares each bit of the first operand to that bit of the second operand. If both bits are 1, the bit is set to 1. Otherwise, the bit is set to 0. Both operands to the bitwise AND operator must be of integral types. Example #include using namespace std; int main() { unsigned short a = 0x5555; // pattern 0101 ... unsigned short b = 0xAAAA; // pattern 1010 ... cout
Read More