Vikyath Ram has Published 138 Articles

Java labelled for loop

Vikyath Ram

Vikyath Ram

Updated on 15-Jun-2020 09:14:32

2K+ Views

Following program is using labeled for loops.ExampleLive Demopublic class Tester {    public static void main(String args[]) {             first:          for (int i = 0; i < 3; i++) {             for (int j = 0; ... Read More

How to parse JSON object in JavaScript?

Vikyath Ram

Vikyath Ram

Updated on 12-Jun-2020 11:28:10

677 Views

ExampleTo parse JSON object in JavaScript, implement the following code −                    myData = JSON.parse('{"event1":{"title":"Employment period", "start":"12\/29\/2011 10:20 ", "end":"12\/15\/2013 00:00 "}, "event2":{"title":"Employment period", "start":"12\/14\/2011 10:20 ", "end":"12\/18\/2013 00:00 "}}')          myArray = []       ... Read More

What is nodeValue property in JavaScript HTML DOM?

Vikyath Ram

Vikyath Ram

Updated on 22-May-2020 11:15:51

282 Views

The nodeValue property is used to get the node value. You need to specify the node.ExampleYou can try to run the following code to learn how to get nodeValue property.Live Demo           Get the node value       Demo Button Text       ... Read More

What is the difference between a StringBuffer and StringBuilder in java?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 12:25:18

377 Views

The StringBuffer and StringBuilder classes are used when there is a necessity to make a lot of modifications to Strings of characters.Unlike Strings, objects of type StringBuffer and String builder can be modified over and over again without leaving behind a lot of new unused objects.The StringBuilder class was introduced as of ... Read More

What does the method int capacity() do in java?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 10:06:15

335 Views

The capacity() method is used to return the current capacity of a vector. Capacity is the length of the array kept in the vector.Exampleimport java.util.Vector; public class VectorDemo {    public static void main(String[] args) {       Vector vec = new Vector();       vec.add(14);     ... Read More

What does the method empty() do in java?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 10:00:29

146 Views

The empty() method is used to test if this stack is or not.Exampleimport java.util.*; public class StackDemo {    public static void main(String args[]) {           Stack st = new Stack();       st.push("Java");       st.push("Source");       st.push("code");       ... Read More

How to limit input text length using CSS3?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 07:28:19

1K+ Views

With HTML, you can easily limit input length. However, with CSS3, it will not be possible, since CSS can’t be used to limit the number of input characters. This will cause a functional restriction.CSS deals with presentation i.e. how your web page will look. This is done with HTML attribute ... Read More

Does a favicon have to be 32x32 or 16x16?

Vikyath Ram

Vikyath Ram

Updated on 25-Feb-2020 06:44:30

6K+ Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with a smaller size. The size of a favicon is 16x16, since it also gets displayed next to the URL of your site in a browser's address bar.The ... Read More

Member variables vs Local variables in Java

Vikyath Ram

Vikyath Ram

Updated on 24-Feb-2020 05:31:57

2K+ Views

Local VariableLocal variables are declared in methods, constructors, or blocks.Local variables are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block.Access modifiers cannot be used for local variables.Local variables are visible only within the declared method, ... Read More

How do you check if a ResultSet is empty or not in JDBC?

Vikyath Ram

Vikyath Ram

Updated on 21-Feb-2020 10:51:41

8K+ Views

Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries(in general).The ResultSet object contains a cursor/pointer which points to the current row. Initially this cursor is positioned before first row (default position).The next() methodThe next() method of ... Read More

Previous 1 ... 5 6 7 8 9 ... 14 Next
Advertisements