Found 33676 Articles for Programming

Haskell Program to Print Upper Star Triangle Pattern

Akhil Sharma
Updated on 06-Apr-2023 10:29:57

181 Views

This tutorial will help us in printing the upper star triangle pattern using mapM function, forM function, and unliness functions in Haskell. An upper star triangle pattern is a graphical representation of a triangle made up of asterisks or stars as shown below. * ** *** **** ***** It's called an "upper" star triangle because the triangle starts at the top and the number of stars in each row decreases as we move down the triangle. Algorithm Step 1 − We will start with defining a user-defined function as printStars function. Step 2 − Program execution will be ... Read More

Java program to extract a single quote enclosed string from a larger string using Regex

Pranay Arora
Updated on 16-Sep-2024 23:24:33

1K+ Views

Regex or Regular Expression is the language used for pattern-matching and string manipulation. It consists of a sequence of characters that define a search pattern and can be used for performing actions like search, replace, and even validate on text input. A regular expression consists of a series of characters and symbols that amount to form a search pattern. In this article, we are going to see how to write a Java program to extract a single quote-enclosed string from a larger string using Regex. Java provides support for regex from the java.util.regex package. The pattern class represents a compiled ... Read More

Java Program to Display Name of the Weekdays in Calendar Year

Shriansh Kumar
Updated on 30-Sep-2024 15:56:38

747 Views

There are 5 weekdays in a week, which are Monday, Tuesday, Wednesday, Thursday and Friday. The two remaining days i.e. Saturday and Sunday make up the weekend. In this article, we will learn how to write a Java program to display name of the weekdays in a calendar year. Using the DateFormatSymbols Class The Java standard library's java.text package contains the DateFormatSymbols class which provides methods for retrieving and setting the following date and time symbols − Month and day names and abbreviations Day of the week names and abbreviations Era names AM/PM strings Time Zone Names and ... Read More

Java program to display name of months of calendar year in short format

Pranay Arora
Updated on 10-Oct-2024 11:35:28

889 Views

A year has 12 months which are named January, February, March, April, May, June, July, August, September, October, November, December. These are the complete names of the months and there are multiple ways to represent them like short format, complete format, MM or 2 integers format. In this article, we are going to see how to display names of months of calendar year in short format with the help of Java. There are numerous ways to do so and are as follows − Using a String Array ... Read More

Java Program to Demonstrate How User Authentication is Done

Pranay Arora
Updated on 06-Apr-2023 10:18:43

2K+ Views

Authentication refers to the process of verifying the identity of an individual to make sure the user is exactly who they are claiming to be before giving access to a system. It is very important to authenticate a user to ensure the security as well as integrity of the system. Over the course of time, authentication has developed into much more advanced and secure methods. The methods of authentication now range from credentials like user id, password and OTP to finger print scan, face ID scan and much more. Authentication ensures that no sensitive resources are being shared with unauthorised ... Read More

Why Java will Remain Programming Language for 2023

Mr. Satyabrata
Updated on 06-Apr-2023 10:17:29

837 Views

Java is a high-level, object-oriented programming language that was first released in 1995. It was designed to be portable across platforms and devices, allowing developers to write code once and run it anywhere. Java is known for its simplicity, reliability, and security features, making it a popular choice for developing enterprise applications, mobile apps, games, and more. It has a large and active community of developers, resulting in a vast array of libraries and tools that make Java development even more efficient and effective. Java, the versatile programming language, celebrated its 25th anniversary in 2022. Despite its relative youth, ... Read More

Which Language Can Replace Java?

Mr. Satyabrata
Updated on 06-Apr-2023 10:15:04

746 Views

Java is a high-level object-oriented programming language that offers a class-based development approach, enabling the creation of software solutions with minimal dependencies. It is a versatile language that provides several benefits, including simplicity, platform orientation, security, and cost-effectiveness in terms of hardware resources. Additionally, Java is known for its stability and reliability. However, there are some disadvantages of using Java, such as high memory consumption, unattractive graphical user interfaces, and complex coding requirements. Pros and Cons of Java Pros of Java Memory Safety − Java eliminates the risk of null pointer exceptions, dangling pointers, and memory leaks, which are ... Read More

Which Fields Have More Demand Now, Java or JavaScript?

Mr. Satyabrata
Updated on 06-Apr-2023 10:13:19

2K+ Views

Java and JavaScript are two programming languages that are often compared and pitted against each other, thanks to their similar names. However, they are fundamentally different languages, with their own unique strengths and applications. Java is a mature language that has been around for over two decades and is widely used for enterprise-level software development. It is known for its stability, security, and cross-platform compatibility. Java's static type checking system makes it a safer option for larger software projects. On the other hand, JavaScript is a dynamic language that is primarily used for front-end web development. It enables developers to ... Read More

What Basic Understanding of Java is Required for Android Programming?

Mr. Satyabrata
Updated on 06-Apr-2023 10:11:47

752 Views

With billions of devices running on it worldwide, Android is among the most popular mobile operating systems. You'll need to have a firm grasp of the Java programming language if you're interested in creating mobile apps for Android. We'll examine the fundamental Java ideas required for Android programming in this article. Understanding the Java Language Android apps are created using Java, a high-level programming language, which is used to create a variety of applications. Being an object-oriented language, it groups data into objects with attributes like properties and methods. Java is also platform-independent, thus programmes written in it can ... Read More

What are the Concepts Every Java Programmer Must Know?

Mr. Satyabrata
Updated on 06-Apr-2023 10:03:09

2K+ Views

Java is one of the most popular programming languages in the world, and it's extensively used for erecting enterprise- grade operations. As a Java programmer, it's essential to have a strong understanding of the language's core generalities and features. In this composition, we will bandy the abecedarian generalities that every Java programmer must know to make robust and scalable operations. Java Basics Java is an explosively compartmented language, which means that all variables must have a data type. Some of the generally used data types in Java include integers, floats, doubles, Booleans, and strings. In addition, Java has a ... Read More

Advertisements