Tutorialspoint

Can we write any code after throw statement in Java?

raja ramesh
Answered 2d 22h ago

No, we can not place any code after throw statement, it leads to compile time error Unreachable Statement.Throw keyword in JavaThe throw keyword is used to throw an exception manually.Whenever it is required to suspend the execution of the functionality based on the user-defined logical error condition, we will use this ... Read More

How to decode an encoded string in JavaScript?

vineeth.mariserla
Answered 2d 22h ago

DecodingIn JavaScript, to decode a string unescape() method is used. This method takes a string, which is encoded by escape() method, and decodes it. The hexadecimal characters in a string will be replaced by the actual characters they represent using unescape() method.Syntaxunescape(string)ExampleIn the following the two exclamation marks have converted ... Read More

How to remove non-word characters in JavaScript?

vineeth.mariserla
Answered on 24th Jun, 2019

Removing non-word charactersTo remove non-word characters we need to use regular expressions. The logic behind removing non-word characters is that just replace the non-word characters with nothing('').ExampleIn the following example there are many non-word characters and in between them there exists a text named "Tutorix is the best e-learning platform". ... Read More

How to Check if PHP session has already started?

Alok Prasad
Answered on 24th Jun, 2019

In PHP, we utilize session_start() an inbuilt function to start the session .But the problem we face in a PHP script is if we execute it more than once it throws an error. So here we will learn how to check the session started or not without calling session_start() function ... Read More

How many types of anonymous inner classes are defined in Java?

raja ramesh
Answered on 24th Jun, 2019

An anonymous inner class is an inner class which is declared without any class name at all. In other words, a nameless inner class is called an anonymous inner class. Since it does not have a name, it cannot have a constructor because we know that a constructor name is the ... Read More

What is the use of Atomics in JavaScript?

vineeth.mariserla
Answered on 24th Jun, 2019

AtomicsThe Atomics is an object in JavaScript which provides atomic operations to be performed as static methods. Just like the methods of Math object, the methods and properties of Atomics are also static. Atomics are used with SharedArrayBuffer objects.The Atromic operations are installed on an Atomics Module. Unlike other global objects, Atomics is not a constructor. Atomics cannot ... Read More

What is the use of weakSet.has() method in JavaScript?

vineeth.mariserla
Answered on 24th Jun, 2019

weakSet.has()This is an inbuilt function in javascript which is used to return a boolean value on scrutinizing whether an object is present in weakSet or not. The weakSet object lets you store weakly held objects in a collection.SyntaxweakSet.has(obj);ArgumentsFrom the above line of code,  weakSet.has() accepts a parameter 'obj' and checks whether the ... Read More

How to hide e-mail address from an unauthorized user in JavaScript?

vineeth.mariserla
Answered on 21st Jun, 2019

Hiding an e-mail addressThe following steps are to be followed to hide our e-mail from unauthorized users. In every email address '@' symbol is common so try to remove it from the email address using split() method. In the following example after splitting the email(batman@gmail.com) we get the result as batman, gmail.com.Divide ... Read More

How to access a function property as a method in JavaScript?

vineeth.mariserla
Answered on 21st Jun, 2019

Accessing a function as a method A javascript object is made up of properties. To access a property as a method, just define a function to a property and include other properties in that function.In the following example an object called "employee" is created with properties "fullName", "lastName" , "firstName" and ... Read More

What are the differences between import and static import statements in Java?

raja ramesh
Answered on 21st Jun, 2019

We can use an import statement to import classes and interface of a particular package. Whenever we are using import statement it is not required to use the fully qualified name and we can use short name directly. We can use static import to import static member from a particular class ... Read More

HTML DOM Object type Property

Ankith Reddy
Answered on 21st Jun, 2019

The HTML DOM Object type Property is used to set or return the value of the type attribute of an object. However, the type attribute is used to set the media type like the object.Following is the syntax to set the type property −obj.type = type_of_mediaAbove, type_of_media is the standard ... Read More

Adding YouTube videos on an HTML web page

George John
Answered on 21st Jun, 2019

Videos can be easily from YouTuvbe to your web page. You need to just embed the videos.At first, get the Video id −Step1: Go to the Video and right click on it. Select “Stats for nerds” −On clicking, you will get the following dialog box displaying the stats −Above you ... Read More

HTML Doctypes

Chandu yadav
Answered on 21st Jun, 2019

Whenever you create an HTML document, the doctype is the first thing placed in the document.It conveys the web browser about the version of the HTML, this page is written on. It is not casesensitive.Let us see an example displaying DOCTYPE on the top −Example Live Demo<!DOCTYPE html> <html> <head> <title>Document ... Read More

HTML DOM Anchor hash Property

Arjun Thakur
Answered on 21st Jun, 2019

The HTML DOM Anchor hash property is used to set or return the anchor part of the href attribute value. The part of the URL after the # is what we call the anchor part of a link.Following is the syntax to set the hash property −anchorObject.hash = anchor_partAbove, anchor_part ... Read More

HTML DOM Anchor download Property

Ankith Reddy
Answered on 21st Jun, 2019

The HTML DOM download property is used to set or return the value of the download attribute of a link.Following is the syntax to set the download property −anchorObject.download = fileAbove, file represents the file name you can set for the file to be downloaded. The actual extension will get ... Read More

Advertisements
Loading...
Unanswered Questions View All

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.