Home » Archives for Sadia Sher

Author Archives: Sadia Sher

This is Sadia (Backend Developer-Java). I have graduated from Jinnah University For Women, Karachi, Pakistan. Coding is my first love, therefore I am a developer. Why Java? Because It has been found as the most diverse language with plenty of APIs, frameworks and integration support. Other than this I am a Yogi. Ever since I practice yoga my lifestyle changes to morning bird. This strengthens my core just as JVM strengthens Java.

The Ternary Conditional Operator ? : in Java

In this article, we will explore the ternary operator ?(question mark) and :(colon) in Java, what is its purpose, and why do we use it? 1. What is a Ternary Operator? The operator ? : in Java, is a ternary operator. It uses to evaluate a boolean expression. It is also known as a conditional operator. It consists of three ...

Read More »

What is a Constructor in Java

In this article, we are going to explore what is a constructor in Java, why it is used, how it is formed, what are the rules applied to create one, we will see different types of constructors, constructor chaining, and overloading. 1. What is a Constructor in Java? The constructor is a piece of code that runs whenever the compiler ...

Read More »

How to Convert a String to Array in Java

In this example, we are going to learn how to convert a string into an array in Java. We are going to discuss three different methods to break a string into an array. Using substring() methodUsing toCharArray() methodUsing split() method 1. Using substring() method The string class provides substring() method to fetch part of a string. String class has two ...

Read More »