Advantages of CSS

Ankitha Reddy
Updated on 28-Aug-2024 15:53:53

17K+ Views

CSS or Cascading Style Sheets is used to design the web pages, it helps web developers to control the layout and other visual aspects of the web pages. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used. In this article, we will be discussing various advatages of CSS Advantages of CSS Consistent Design: By using CSS, we can use same design across an entire website or on various web pages. This reduces ... Read More

Change Image on Hover with CSS

Shabaz Alam
Updated on 28-Aug-2024 11:28:18

20K+ Views

To change image on hover with CSS, we will be using :hover psuedo-class. In this article, we have discussed two different approaches to change image on hover with CSS properties. We are having an image in our HTML document, our task is to change the image when we hover over the image. Approaches to Change Image on Hover Here is a list of approaches to change image on hover with CSS which we will be discussing in this article with stepwise explaination and complete example codes. Change Image on Hover Using background Property ... Read More

Create Todo App Using ReactJS

Vikash Kumar
Updated on 28-Aug-2024 10:03:38

218 Views

Creating a ToDo app is the best way to start learning ReactJS. In this article, we will see how to build a simple ToDo app using React. The project will cover key React concepts like components, state management, props, and event handling. Features of Todo List The ToDo app will allow users to. Add new tasks. Mark tasks as complete. Delete tasks from the list. For better management we will break down the app into small reusable components and manage the state using React's ... Read More

Check If String Contains Only Digit Characters in Java

Samual Sam
Updated on 27-Aug-2024 18:49:01

2K+ Views

Introduction In this article, we'll explore how to check whether a given string contains only digits or a mix of digits and other characters in Java. We'll achieve this by using the String class and its matches() method. Problem Statement Given a string write a Java program to check whether it contains only digit characters. Input 1 4434 Output 1 String contains only digits! Input 2 5demo9 Output 2 String contains digits as well as other characters! Steps to check digit characters in String The following are the steps to check whether the String contains only digit characters in ... Read More

Java Program for Recursive Bubble Sort

AmitDiwan
Updated on 27-Aug-2024 18:48:46

2K+ Views

In this article, we will learn to implement Bubble Sort using recursion in Java. Our goal is to understand how recursion can be applied to the Bubble Sort algorithm to achieve the same sorting effect as its iterative counterpart. Problem Statement Write a Java program to sort an array of integers using the recursive approach of Bubble Sort. Input my_arr[] = {45, 67, 89, 31, 63, 0, 21, 12} Output The array after implementing bubble sort is[0, 12, 21, 31, 45, 63, 67, 89] Bubble Sort Algorithm Bubble sort algorithm is a simple sorting algorithm to sort elements. ... Read More

Get Operating System Name and Version in Java

Samual Sam
Updated on 27-Aug-2024 18:48:33

2K+ Views

In this article, we will discuss how to get the operating system name and version in Java. To get the name and version of the operating system we will be using the System.getProperty() method. Steps to get the operating system name and version The following are the steps to get the operating system name and version − We will start by defining a class named Demo and inside that we will create the main method.Inside that main method, we will use the os.name and os.version to get the name and version of the operating system.And at the ... Read More

Calculate Distance Light Travels in Java

karthikeya Boyini
Updated on 27-Aug-2024 18:48:19

2K+ Views

In this article, we will demonstrate how to calculate the distance light travels in one year using Java. We will use the Demo class and the main method to perform this calculation. Speed of light: 186000Days = 365dist = speed * seconds Problem Statement Write a Java program to calculate the total distance that light travels in a year, given that the speed of light is 186, 000 miles per second. Output Light travels: 5865696000000 miles Steps to calculate distance light travels Following are the steps to calculate the distance light travels − Initialize the Demo class.Define ... Read More

Split a List into Two Halves in Java

AmitDiwan
Updated on 27-Aug-2024 18:48:06

2K+ Views

In this article, we will understand how to split a list into two halves. A list is an ordered collection that allows us to store and access elements sequentially. It contains index-based methods to insert, update, delete, and search the elements. It can also have duplicate elements. We will be using different approaches to split a list into two halves − Problem Statement Write a Java program to split a list into two halves. As demonstrated below − Input  Input list :[Java, Python, JavaScript, Shell, Scala] Output The first half of the list is: [Java, Python] The second half of ... Read More

Subtract Year from Current Date in Java

Samual Sam
Updated on 27-Aug-2024 18:47:50

2K+ Views

In this article, we will learn to subtract a year from the current date using Java. We will be using the Calender class of java.util package. Calendar class in Java is an abstract class that provides different methods to convert between a specific instant in time and a set of calendar fields such as HOUR, DAY_OF_MONTH, MONTH, YEAR, and so on. It is also used for manipulating the calender field. Steps to subtract year from current date Following are the steps to subtract year from current date − Import the Calendar class from the java.util package. ... Read More

Print Swastika Pattern in Java

Saba Hilal
Updated on 27-Aug-2024 18:47:37

2K+ Views

Swastika is a religious symbol of Hinduism, Buddhism, and Jainism. In this article, we will learn to print Swastika by taking user input. Here, are three different approaches for making this design using Java. In all the approaches, the size of the Swastika is decided by the user. The user provides the input for the table or frame size. The Swastika is often used as an example to learn rows, columns, and tabular layout concepts using different languages including Java. Making Swastika using Java. Here, three different approaches are used to make this design using Java − ... Read More

Advertisements