Rama Giri has Published 107 Articles

How is the java memory pool divided?

Rama Giri

Rama Giri

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

402 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

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

Rama Giri

Rama Giri

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

404 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));          

Removal of negative numbers from an array in Java

Rama Giri

Rama Giri

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

753 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

336 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

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

367 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

102 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

How can we update values in a MySQL table?

Rama Giri

Rama Giri

Updated on 30-Jan-2020 06:00:27

560 Views

With the help of UPDATE statement and WHERE clause, we can update the values in single or multiple rows of the table. MySQL updates the values on the basis of condition specified in WHERE clause. For example, suppose in the ‘employee’ table we want to change the ‘name’ and ‘doj’ ... Read More

Is there a naming convention for tables in MySQL?

Rama Giri

Rama Giri

Updated on 28-Jan-2020 12:22:05

554 Views

No, MySQL does not have a preferred naming convention standard. If the name we have chosen is logical and consistent then it would be ok.Two major points need to be remembered, one is that no two tales/databases can have the same name and second we can choose any of the ... Read More

Adding a condition using SQL or an ABAP program and difference in performance

Rama Giri

Rama Giri

Updated on 28-Jan-2020 05:36:38

278 Views

As there are just 500, there would not be much difference among both options. You can use either of them.The ABAP code is as below −LOOP AT lt_table TRANSPORTING NO FIELDS WHERE exp > 5    ADD 1 TO lt_counter ENDLOOP

Advertisements