Ramu Prasad has Published 73 Articles

Downcasting in Java

Ramu Prasad

Ramu Prasad

Updated on 17-Jun-2020 07:32:16

216 Views

Yes, a variable can be downcast to its lower range substitute by casting. It may lead to data loss although. See the example below −Example Live Demopublic class Tester {    public static void main(String[] args) {       int a = 300;       byte b = (byte)a; ... Read More

How to reverse the elements of an array using stack in java?

Ramu Prasad

Ramu Prasad

Updated on 16-Jun-2020 11:41:10

3K+ Views

Stack is an Abstract Data Type (ADT), commonly used in most programming languages. It is named stack as it behaves like a real-world stack, for example – a deck of cards or a pile of plates, etc.A stack is first in first out, it has two main operations push and ... Read More

How to store the contents of arrays in a file using Java?

Ramu Prasad

Ramu Prasad

Updated on 16-Jun-2020 08:56:30

2K+ Views

You can use write data into a file using the Writer classes. In the example given below, we are writing the contents of the array using the BufferedWriter.ExampleLive Demoimport java.io.BufferedWriter; import java.io.FileWriter; public class WritingStringArrayToFile {    public static void main(String args[]) throws Exception {       String[] ... Read More

Checking number of rows in an internal table in SAP

Ramu Prasad

Ramu Prasad

Updated on 15-Jun-2020 15:10:31

8K+ Views

You can use the LINES function to get the number of rows in an internal table.Use the following syntax to call the function:DESCRIBE TABLE LINES Once the function is executed the variable will hold the number of rows in the internal table.

How to label a block in JavaScript?

Ramu Prasad

Ramu Prasad

Updated on 15-Jun-2020 12:13:36

271 Views

A block statement groups zero or more statements. In languages other than JavaScript, it is known as a compound statement.SyntaxHere’s the syntax −{    //List of statements }To add a label to a block, use the following −Identifier_for_label: {    StatementList }Let’s use it for break statement. You can try ... Read More

What is the role of clientY Mouse Event in JavaScript?

Ramu Prasad

Ramu Prasad

Updated on 23-May-2020 09:17:56

100 Views

When a mouse event is triggered, the clientY mouse event property is used to get the vertical coordinate of the mouse pointer. This is according to the current window.ExampleYou can try to run the following code to learn how to implement clientY Mouse event in JavaScript.       ... Read More

What is the usage of onresize event in JavaScript?

Ramu Prasad

Ramu Prasad

Updated on 21-May-2020 07:48:58

173 Views

The resize event is triggered when the window is resized. Use window.outerWidth and window.outerHeight event in JavaScript to get the size of windows when the browser is resized.ExampleYou can try to run the following code to work with an onresize event in JavaScript.             ... Read More

How to do bitwise complement on a 16-bit signal using Python?

Ramu Prasad

Ramu Prasad

Updated on 05-Mar-2020 07:33:37

237 Views

If you want to get an inversion of only first 16 bits of a number, you can take a xor of that number with 65535(16 1s in binary). examplea = 3 # 11 in binary b = a ^ 65535 print(bin(b))OutputThis will give the output −0b1111111111111100

Execute a script when a page has unloaded in HTML?

Ramu Prasad

Ramu Prasad

Updated on 03-Mar-2020 07:37:55

86 Views

The unloaded attribute triggers when a web page has unloaded. You can try to run the following code to implement unloaded attribute in HTML −Example           Tutorialspoint       Simply Easy learning                function display() {             alert("Bye!");          }          

Enclose a text to make it blink with HTML.

Ramu Prasad

Ramu Prasad

Updated on 03-Mar-2020 06:25:20

135 Views

Use the tag to blink a text. The HTML tag is used to enclose a text to make it blink.You can try to run the following code to implement tag − Note − Do not use this element as it is obsolete.Example           ... Read More

Advertisements