Ankitha Reddy

Ankitha Reddy

45 Articles Published

Articles by Ankitha Reddy

45 articles

What are the advantages of CSS?

Ankitha Reddy
Ankitha Reddy
Updated on 28-Aug-2024 17K+ Views

CSS or Cascading Style Sheets is used to design the web pages, it helps web developers to control the layout and other visual aspects of the web pages. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used. In this article, we will be discussing various advatages of CSS Advantages of CSS Consistent Design: By using CSS, we can use same design across an entire website or on various web pages. This reduces ...

Read More

Java Naming Conventions

Ankitha Reddy
Ankitha Reddy
Updated on 22-Aug-2024 4K+ Views

All Java components require names. Names used for classes, variables and methods are called identifiers. The naming conventions for different Java components are as follows: Package Naming Convention Class Naming Convention Interfaces Naming Convention Method Naming Convention Constants Naming Convention Variables Naming Convention Quick Summary Package Naming Convention Naming conventions for Java packages typically involve using lowercase letters. It's common to use ...

Read More

How to run Java package program

Ankitha Reddy
Ankitha Reddy
Updated on 26-Oct-2023 34K+ 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 animals; interface Animal {    public void eat();    public void travel(); }Now, let us implement the above interface in the same package animals −package animals; /* File name : MammalInt.java */ public class MammalInt implements Animal {    public void eat() {       System.out.println("Mammal eats");    } ...

Read More

What is MySQL LOAD DATA statement?

Ankitha Reddy
Ankitha Reddy
Updated on 22-Jun-2020 312 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 the file.file_name is the name of the .txt filetable_name is the table where the data will be loaded.To illustrate the concept we are having the following data, separated by tab, in ‘A.txt’ whose path is d:/A.txt −100 John USA 10000 101 Paul UK 12000 102 Henry NZ 11000 103 Rick ...

Read More

CSS3 Multi-Column column-span Property

Ankitha Reddy
Ankitha Reddy
Updated on 21-Jun-2020 75 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;       column-count: 4;       /* Column gap property */       -webkit-column-gap: 40px;       -moz-column-gap: 40px;       column-gap: 40px;       /* Column style property */       column-rule-style: solid;       column-rule-color: #ff00ff;   ...

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 168 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 and store only the date value in that column. Following example will exhibit it −Examplemysql> Create table date_time_test(date DATE); Query OK, 0 rows affected (0.44 sec) mysql> Insert into date_time_test(date) values(‘2017-09-09 09:34:21’); Query OK, 1 row affected, 1 warning (0.03 sec) mysql> Select * from date_time_test; +------------+ | ...

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 238 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 −mysql> Insert into date_testing(date) values('2017-02-30'); ERROR 1292 (22007): Incorrect date value: '2017-02-30' for column 'Date' at row1Now we need to enable ALLOW_INVALID_DATES mode enabled as follows −mysql> SET sql_mode = 'ALLOW_INVALID_DATES'; Query OK, 0 rows affected (0.00 sec) mysql> Insert into date_testing(date) values('2017-02-30'); Query OK, 1 row affected (0.14 ...

Read More

What is runtime polymorphism or dynamic method overloading?

Ankitha Reddy
Ankitha Reddy
Updated on 05-Mar-2020 1K+ Views

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Method overriding by a subclass is termed as runtime polymorphism. JVM determines the method to be executed at runtime instead of compile time. exampleLive Democlass SuperClass {    SuperClass get(){       System.out.println("SuperClass");       return this;    } } public class Tester extends SuperClass {    Tester get(){       System.out.println("SubClass");       return this;    }    public static void main(String[] args) {       SuperClass tester = new Tester();         tester.get();    }   }OutputSubClass

Read More

How to catch exceptions in JavaScript?

Ankitha Reddy
Ankitha Reddy
Updated on 16-Jan-2020 386 Views

To catch exceptions in JavaScript, use try…catch…finally. JavaScript implements the try...catch...finally construct as well as the throw operator to handle exceptions.You can catch programmer-generated and runtime exceptions, but you cannot catch JavaScript syntax errors.ExampleYou can try to run the following code to learn how to catch exceptions in JavaScript − Live Demo                                         Click the following to see the result:                          

Read More

How to break a loop in JavaScript?

Ankitha Reddy
Ankitha Reddy
Updated on 08-Jan-2020 446 Views

The break statement is used to break a loop and continue executing the code, which is after the loop.ExampleYou can try to run the following code to break a loop in JavaScriptLive Demo                          var text = "";          var i;          for (i = 0; i < 5; i++) {             if (i === 2) {                break;             }             text += "Value: " + i + "";          }          document.getElementById("test").innerHTML = text;           OutputValue: 0 Value: 1

Read More
Showing 1–10 of 45 articles
« Prev 1 2 3 4 5 Next »
Advertisements