Rama Giri has Published 110 Articles

How is the java memory pool divided?

Rama Giri

Rama Giri

Updated on 18-Jun-2020 07:13:47

332 Views

Java memory pool is divided into 5 parts namely −Method area − The method area stores the class code − code of the variables and methods.Heap−The Java objects are created in this area.Java Stack− While running methods the results are stored in the stack memory.PC registers− These contain the address of ... Read More

Which is the best site for Java interview questions?

Rama Giri

Rama Giri

Updated on 18-Jun-2020 06:00:44

731 Views

There are many sites which are a good resource for java interview questions-answers. Following is the list of most popular websites.Tutorialspointwww.Tutorialspoint.comStackOverflowwww.stackoverflow.comDZonewww.dzone.comWikipediawww.wikipedia.orgIBM Developer Workswww.ibm.com/developerworks/java/

How to return a random number between 0 and 199 with JavaScript?

Rama Giri

Rama Giri

Updated on 20-May-2020 10:49:10

289 Views

To return a random number between 0 and 199, use the JavaScript Math.random() and Math.floor() method.ExampleYou can try to run the following code to return a random number in JavaScript.                    document.write(Math.floor(Math.random() * 200));          

Java Substring Comparisons

Rama Giri

Rama Giri

Updated on 26-Feb-2020 06:24:32

953 Views

Following is an example which compares Strings and portion of strings in Java? Explain with an example.ExampleLive Demopublic class StringDemo {    public static void main(String[] args) {       String str1 = "tutorials point";       String str2 = str1.substring(10);       int result = str1.compareTo(str2); ... Read More

Removal of negative numbers from an array in Java

Rama Giri

Rama Giri

Updated on 24-Feb-2020 10:41:59

534 Views

Following program shows how to remove negative numbers from an array.Exampleimport java.util.ArrayList; import java.util.Iterator; import java.util.List; public class Tester {    public static void main(String[] args) {       List objArray = new ArrayList();       objArray.clear();       objArray.add(2);       objArray.add(-3);     ... Read More

What are fundamental data types in C++ programming?

Rama Giri

Rama Giri

Updated on 11-Feb-2020 07:28:40

2K+ Views

A fundamental or primitive type is a data type where the values that it can represent have a very simple nature (a number, a character or a truth-value); the primitive types are the most basic building blocks for any programming language and are the base for more complex data types.C++ ... Read More

Unary operators in C++

Rama Giri

Rama Giri

Updated on 11-Feb-2020 06:53:36

228 Views

Unary operator are operators that act upon a single operand to produce a new value. The unary operators are as follows −Indirection operator (*) - It operates on a pointer variable, and returns an l-value equivalent to the value at the pointer address. This is called "dereferencing" the pointer.Address-of operator ... Read More

What are C++ Manipulators (endl, setw, setprecision, setf)?

Rama Giri

Rama Giri

Updated on 11-Feb-2020 05:28:21

3K+ Views

Stream Manipulators are functions specifically designed to be used in conjunction with the insertion () operators on stream objects, for example −std::cout

How MySQL SUBSTRING_INDEX() function returns the substring if we provide the negative value of the argument ‘count’?

Rama Giri

Rama Giri

Updated on 10-Feb-2020 07:11:51

276 Views

MySQL SUBSTRING_INDEX() function can accept the negative value of argument ‘count’ and in this case, it returns the substring from the right of the final delimiter.Examplemysql> Select SUBSTRING_INDEX('www.google.com', '.', -2); +------------------------------------------+ | SUBSTRING_INDEX('www.google.com', '.', -2) | +------------------------------------------+ | google.com                       ... Read More

What happens if the substring is there for more than one time in the string given as the arguments of LOCATE() function?

Rama Giri

Rama Giri

Updated on 03-Feb-2020 06:15:53

57 Views

In case if the substring is there for more than one time in the string then MySQL LOCATE() function will return the position of the first occurrence of the substring.Examplemysql> Select LOCATE('good', 'Ram is a good boy. Is Ram a good boy?')As Result; +--------+ | Result | +--------+ |   ... Read More

Advertisements