Access modifiers are special keywords that define the accessibility or scope of a member. We can specify how other code can interact with specific methods or variables within or outside classes and packages. Like many programming concepts, access modifiers are simple in practice but can seem confusing at first. Once you understand them, they can help make your code more readable and maintainable. Understand the Difference Between Members Java provides 4 types of access modifiers with different scopes and visibility. Any member without any specifier is dealt with as “Default” or “package-private”. Private: A private member is accessible only in…
Author: Rahul
Google Chrome DevTools (developer tools) is the browser’s built-in comprehensive toolkit for developers. Which provides a large number of information that is useful for the developers for debugging purposes. You can also find the website’s request headers and response header values directly with dev tools. View HTTP Headers in Chrome Follow the below steps to open developer tools in Google Chrome and view HTTP header values. Open DevTools: You can open Google Chrome’s developer tools with two methods. Choose any one method: Right-click on the browser and click Inspect Press F12 function button in the keyboard. View HTTP headers: Open…
Request Header and Response Header are both a part of the HTTP protocol, which is the standard used for communication between web browsers and web servers. The Request Header is sent by the browser as part of an HTTP request, and it contains information such as the type of request, the URL of the requested page, and any authentication credentials. The Response Header is sent by the server in response to the request, and it contains information such as the status code of the response, the content type of the page, and any authentication credentials. Together, the Request and Response…
Code formatting is essential for developers. A formatted code is easy to understand for other developers and allows us to find issues within the source code quickly. This article will help you to format source code in Visual Studio Code (VSCode) editor on various operating systems. VSCode – Code Formatting Keyboard Shortcuts You can format code using the keyboard shortcuts. Use the following key combinations to format code in Visual Studio Code (VSCode). Shift + Alt + F : Windows Users Shift + Option + F: macOS Users Ctrl + Shift + I: Linux Users VSCode – Code Formatting Option…
Q. How do I find the installed Tomcat version on a Linux system? Tomcat installation directory contains an shell script version.sh for the Linux-based systems and version.bat for Windows systems. This script provides detailed information about the Tomcat version and other useful information. We can use these scripts to find the Tomcat version. This quick tutorial will help you to find Apache Tomcat version on any Linux-based operating system. Check Tomcat Version Use the cd command to switch to the Tomcat installation bin directory. The location of the directory depends on the installation types. The packages installed on the official…
MySQL, a widely favored open-source relational database management system, is compatible with Linux, Windows, and Mac OS. It’s primarily used as a back-end database for web applications and for data storage in various software types. This system facilitates data storage, organization, retrieval, and conversion, such as from text to numbers. MySQL is a popular choice for businesses large and small for their websites and applications. This guide provides a concise walkthrough for installing MySQL 8 on Amazon Linux 2. Upon completion, you’ll have an operational MySQL database, accessible through AWS Console or your application. It also introduces the use of…
You probably know that Chrome is the default browser in Ubuntu. But did you know that you can change this? There are several other browsers that come pre-installed with Ubuntu, such as Firefox and Midori. If you’re not a fan of Chrome or if you prefer to use another browser for your browsing needs, changing the default browser from Chrome to Firefox, for example, is pretty straightforward. This tutorial will show you how to change the default web browser on Ubuntu and other versions of Linux Mint. Change Default Web Browser in Ubuntu When you click on a link the…
Sometimes we need to map a sub URL to a different directory path in the file system. The Nginx users can achieve this by using the “location” block in the configuration file. The location specifies a regular expression for the URL the browser requests. Under the location code block, we can specify the file system path with the ‘root’ or ‘alias’ option. You may use the alias directive within a location block, like this:
1 2 3 4 5 6 7 | server { server_name www.example.com; root /var/www/example.com; location /static/ { alias /var/content/static/; } } |
In the above configuration, the main site is configured with the /var/www/example.com directory. But the URL begins with “/static” will be served with “/var/content/static” directory.…
Crontab is a utility for running scheduled tasks at regular intervals on Unix-Linux systems. It allows us to schedule multiple cron jobs to run at once. We can schedule any shell command or script to can be executed on the terminal. Every scheduled job in crontab is separated by a new line. We can also define multiple commands or scripts in a single cron job to run one by one. How to Sepreate Two Commands in Linux You can separate two or more commands by using semicolons (;), logical AND (&&), or logical OR (||) operators. Which of these operators…
The “Connection Refused” error means that the computer is not accepting connection requests to the requested IP address and port. Connection requests may be blocked by a firewall, which is why “Connection refused” is displayed. When a computer receives a connection request from an IP address and port that it wants to connect to, but the firewall blocks the connection, the “Connection Refused” error message appears. “Connection refused” can be due to a firewall blocking connection requests. In some cases, none of the services are listening on the requested port also causes the “Connection Refused” error. The Problem: Today, I…






