Try Block Without Catch Block in Java

raja
Updated on 21-Nov-2023 10:08:40

34K+ Views

Yes, It is possible to have a try block without a catch block by using a final block. As we know, a final block will always execute even there is an exception occurred in a try block, except System.exit() it will execute always. Example 1 public class TryBlockWithoutCatch { public static void main(String[] args) { try { System.out.println("Try Block"); } finally { System.out.println("Finally Block"); } } } Output Try Block Finally Block A ... Read More

Sort a List Alphabetically Using jQuery

Abhishek
Updated on 21-Nov-2023 09:37:08

814 Views

jQuery is a JavaScript library that works on the principle of write less, do more. In jQuery, the syntaxes that are longer and take more time to write are reduced, and alternate methods are introduced to use them in short form. In this article, we are going to learn about the method of sorting a list in alphabetical order using jQuery. Let us discuss some common methods of jQuery which we will use in the code example to sort the list in alphabetical order. text() method − The text method is used to get and set the text of ... Read More

Use Magnific Popup jQuery Plugin

Abhishek
Updated on 21-Nov-2023 09:28:34

577 Views

The Magnific popup is a jQuery plugin that can be used to show some HTML popups on the web page as its name suggests. It is a light-weight, responsive fast and modal dialog jQuery plugin. IT can be used to show any kind of content like images, videos, ajax responses, iframe and image galleries. There are many ways of using this plugin in your current project that are discussed in in details below − By downloading the latest version from https://plugins.jquery.com/magnific-popup/ in the form of zip file. You can also clone the git repository the magnific plugin from https://github.com/dimsemenov/Magnific-Popup.git ... Read More

Bootstrap Media Queries for Very Large Screens

Abhishek
Updated on 21-Nov-2023 09:19:30

132 Views

Bootstrap, is a CSS framework that can be used to style your web pages without even writing the CSS code in an external file. It is an open source framework that is available for free. You just need to include the CSS and the JavaScript CDN of this framework to use the dynamic and interactive components which are already built in this framework. There are some classes define in this framework that you can use to style the elements of your web page. In this article, we are going to learn about writing the bootstrap media queries for very large ... Read More

Use Text Overflow in a Table Cell

Abhishek
Updated on 20-Nov-2023 18:39:22

2K+ Views

The text-overflow property in CSS is used to handle the overflown text on the web page. This property helps us to show the overflown text in a specific way. The text-overflow property is used with two more other properties with fixed value to show overflowed text in a specific manner and those properties are white-space: nowrap; and overflow: hidden; with the given values. Once these properties are set on the element, we can use the text-overflow property with different values as written below − clip − It is the default value of this property in which the overflowed text ... Read More

Use Text as Background Using CSS

Abhishek
Updated on 20-Nov-2023 18:36:34

1K+ Views

In general, we use text in foreground not as background because text is the most important thing for any website and organizing text on frontend with good visibility, readability and fonts to show the users is also important. But sometimes, you need to show the text as background for other text or HTML element with some content. In that case you can use the z-index property of CSS with different properties to show text as background. There are two different ways of using the z-index property with other properties and selectors to show text as background using CSS as listed ... Read More

Use SVG with Before or After Pseudo Element

Abhishek
Updated on 20-Nov-2023 17:59:50

8K+ Views

The :before and :after pseudo elements are used to add the content just before the start of an HTML element and just at the end of the same or any other element. These pseudo selectors help to add content or any other effect without using the un-necessary elements in the HTML DOM. You can add content or any color and CSS effects on the element using these selectors. The :before selector as the name suggests will add the content before the element and the :after element will add the content after the element. You can add any image, color, background ... Read More

Use Simple API with AJAX

Abhishek
Updated on 20-Nov-2023 17:54:04

373 Views

AJAX or Asynchronous JavaScript and XML is a set of existing technologies like: Asynchronous JavaScript and XML. AJAX helps us to fetch the data from any local database or any API without interfering with the existing page. It will fetch the data without reloading the page and without any interruptions. Process of sending the AJAX request to any server. Step 1 − In the first step, we will instantiate a XHR object using the XMLHttpRequest() as shown below − const xhr = new XMLHttpRequest(); Step 2 − In the next step, we will open the ... Read More

Use Font Feature Settings Property in CSS

Abhishek
Updated on 20-Nov-2023 17:49:25

244 Views

The font-feature-settings property is used to control the advance typographic features in open type fonts. The advance typographic features like swashes, small caps and the ligatures can be controlled using the font-feature settings property of CSS. The font-feature-settings property is used by passing two different values as listed below − The first value is the property is used to define the open tyoe feature tags like: "smcp" (small caps), "swsh" (swash). It also has some global values like: "inherit", "initial", and "unset". The second value that is passed to this property will almost be in the form of binary ... Read More

Use Font Variant Settings Property in CSS

Abhishek
Updated on 20-Nov-2023 17:46:59

57 Views

CSS is a way of styling the web pages according to the consumer needs and the design you want. It provides a lot of properties to style our components or pages. The font-variant-settings is also one of those properties that is provided by CSS to style our web pages. The font-variant-settings property provides users a good and healthy low-level control over the fonts with different characteristics and properties. Using font-variant-settings property in CSS The font-variant-settings property can be used in three different ways by giving different types of values to it. The different ways of using this property are explained ... Read More

Advertisements