Ankitha Reddy has Published 75 Articles

How to run Java package program

Ankitha Reddy

Ankitha Reddy

Updated on 26-Oct-2023 02:32:02

25K+ Views

Let us look at an example that creates a package called animals. It is a good practice to use names of packages with lower case letters to avoid any conflicts with the names of classes and interfaces.Following package example contains interface named animals −/* File name : Animal.java */ package ... Read More

Why should we avoid using global variables in C/C++?

Ankitha Reddy

Ankitha Reddy

Updated on 24-Jun-2020 06:10:51

3K+ Views

We should avoid using global variables in any language, not only C++. This is because these variables pollute the global namespace, can cause some very nasty bugs in big projects as they can be accessed from any file and hence be modified from anywhere. These are some of the reasons ... Read More

What is MySQL LOAD DATA statement?

Ankitha Reddy

Ankitha Reddy

Updated on 22-Jun-2020 08:27:00

162 Views

LOAD DATAThis statement is used for importing the data from data files into our database. It reads data records directly from a file and inserts them into a table. Its syntax would be as follows −SyntaxLOAD DATA LOCAL INFILE '[path/][file_name]' INTO TABLE [table_name ];Here, a path is the address of ... Read More

How MySQL WHILE loop statement can be used in stored procedure?

Ankitha Reddy

Ankitha Reddy

Updated on 22-Jun-2020 06:08:42

2K+ Views

As we know that MySQL provides us loop statements that allow us to execute a block of SQL code repeatedly based on a condition. WHILE loop statement is one of such kind of loop statements. Its syntax is as follows −WHILE expression DO statements END WHILEActually, the WHILE loop checks ... Read More

CSS3 Multi-Column column-span Property

Ankitha Reddy

Ankitha Reddy

Updated on 21-Jun-2020 06:28:59

69 Views

The column-span property is used to specify the span between columns. You can try to run the following code to implement column-span property using CSS −Example Live Demo    .multi {       /* Column count property */       -webkit-column-count: 4;       -moz-column-count: 4; ... Read More

How MySQL evaluates if I store date along with time value in a column having DATE data type?

Ankitha Reddy

Ankitha Reddy

Updated on 20-Jun-2020 07:04:43

60 Views

As we know that the default format for MySQL DATE data type is “YYYY-MM-DD” and in this format, there is no possibility to store the time value. But still, if we store date along with time value in a column having DATE data type then MySQL will show a warning ... Read More

How is it possible to store date such as February 30 in a MySQL date column?

Ankitha Reddy

Ankitha Reddy

Updated on 19-Jun-2020 13:57:07

130 Views

Suppose we want to store the date such as February 30 in a MySQL table then we must have to first set ALLOW_INVALID_DATES mode enabled.For example, I am trying to add, without enabling ALLOW_INVALID_DATES mode, such kind of date in a table then MySQL will give an error as follows ... Read More

What is Comma operator in C++?

Ankitha Reddy

Ankitha Reddy

Updated on 18-Jun-2020 13:46:56

137 Views

The purpose of the comma operator is to string together several expressions. The value of a comma-separated list of expressions is the value of the rightmost expression. Essentially, the comma's effect is to cause a sequence of operations to be performed.The values of the other expressions will be discarded. This ... Read More

What is the difference between for...of and for...in statements in JavaScript?

Ankitha Reddy

Ankitha Reddy

Updated on 15-Jun-2020 12:16:31

162 Views

for…in loopThe “for...in” loop is used to loop through an object's properties.Here’s the syntax −Syntaxfor (variablename in object) { statement or block to execute }You can try to run the following example to implement ‘for-in’ loop. It prints the web browser’s Navigator objectExampleLive Demo var aProperty; document.write("Navigator Object ... Read More

How to specify that an element should be pre-selected when the page loads in HTML?

Ankitha Reddy

Ankitha Reddy

Updated on 28-May-2020 00:22:39

117 Views

Use the checked attribute to specify an element is to be pre-selected on page load. The attribute works with − .ExampleYou can try to run the following code to implement checked attribute in HTML − Live Demo           Which sports do you like?                 Football           Cricket           Hockey                    

1 2 3 4 5 ... 8 Next
Advertisements