Image for post
Image for post

In this article you will see, how to create UUID in Java.

Introduction

UUID, a universally unique identifier is a 128-bit number used to identify information in computer systems.

UUID is made of hex digits along with 4 hyphen (“-”) symbols. The length of a UUID is 36 characters.

There are 5 types of UUID but mostly version 4 i.e. Randomly Generated UUID is used.

We are going to create the version 4 UUID here.

Example UUID

df6fdea1–10c3–474c-ae62-e63def80de0b

How to create UUID in Java?

Creating a Randomly Generated UUID (version 4) is really easy in Java.

UUID Class is present in java.util package. And it has the static method randomUUID() which returns the randomly generated UUID. …


Image for post
Image for post
Cover image showing ‘git init’ command

GIT is one of the most important parts of the developer’s day to day work. So learning GIT is a must for a newbie developer. In this article, you are going to learn the 8 most important basic GIT commands.

Below, I have listed down all the 8 commands and then, we will have a look at them one by one.

  1. git init
  2. git clone
  3. git add
  4. git commit
  5. git status
  6. git branch
  7. git pull
  8. git push

1. git init

git init command initializes brand new GIT repository (locally) and begins tracking the existing directory.

When you hit the git init command, git adds a sub-folder withing an existing directory that manages all required files for version controlling. …


In this article, you are going to learn how to compare strings. What problem occurs when you compare string using equals to (=)operator.

Introduction

The String is a special Class in Java. We use String regularly in Java programs, so comparing two string is a common practice in Java. In this article I tried to answer the most common questions about the string, 'How do I compare strings in Java?'

Comparing strings is very helpful the processes like authentication, sorting, reference matching, etc.

I have listed 3 ways to compare strings in Java.

  1. Using equals() method ( comparing the content)
  2. Using == operator (comparing the object…

About

Gaurav Kukade

Java Developer 💻, TechGeek⚙, writes 🖋 at coderolls.com Follow me on twitter @gdkukade ❤

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store