Alankritha Ammu

Alankritha Ammu

27 Articles Published

Articles by Alankritha Ammu

Page 3 of 3

How to remove the last character from a string in Java?

Alankritha Ammu
Alankritha Ammu
Updated on 26-Feb-2020 2K+ Views

The StringBuffer class contains a method known as deleteCharAt(). This method deletes the character at a specified index/position. You can use this method to delete/remove a particular character from a string in Java.Examplepublic class Test { public static void main(String args[]){ String str = "hi welcome to Tutorialspoint"; StringBuffer sb= new StringBuffer(str); sb.deleteCharAt(sb.length()-1); System.out.println(sb); } }Outputhi welcome to Tutorialspoint

Read More

Java Memory Model

Alankritha Ammu
Alankritha Ammu
Updated on 24-Feb-2020 3K+ Views

Java memory model is divided between Thread Stacks (One for each thread) and a heap area.Thread Stack: It is a thread specific memory area and contains local variables, methods call information etc. JVM stacks could be of fixed size or variable size. If computation in a thread exceeds its stack size limit then JVM throws StackOverflowError and exits.HeapIt contains all the objects created during application lifecycle. The heap is created when the virtual machine starts up. Garbage collector reclaims heap storage for objects and objects are never explicitly deallocated. The JVM is not using any automatic storage management system, and ...

Read More

Converting date type SYDATUM in a format like MM/DD/YY in SAP ABAP

Alankritha Ammu
Alankritha Ammu
Updated on 13-Feb-2020 6K+ Views

It depends if you want to write it to a list screen or you want to convert it to a text variable. To write it to a list screen, you can use below code −WRITE I_my_dateMM/DD/YYYYTo convert it to a text variable, you can use below command −WRITE l_my_dateTO l_my_text MM/DD/YYYYIf you want to set the date in SAPscript form, you can use SET DATE MASK command. You can specify date fields to be printed in specified format −/: SET DATE MASK= 'date_mask'In the date mask, you can use the following codes −DD: day (two digits) DDD: day name - ...

Read More

How can we use MySQL TRIM() to remove the whitespaces from all the rows and update table?

Alankritha Ammu
Alankritha Ammu
Updated on 06-Feb-2020 304 Views

Suppose if a table has many values having whitespaces in the columns of a table then it is wastage of space. We can use TRIM() function to remove whitespaces from all the rows and update the table too in a single query. Following the example from ‘Employee’, having whitespaces in all its rows will exhibit the concept −Examplemysql> Select * from Employee; +------+----------------------+----------------------+----------------------+ | Id   | Name                 | Address              | Department           | +------+----------------------+----------------------+----------------------+ | 100  | Raman       ...

Read More

How can we fetch all the records from a particular MySQL table?

Alankritha Ammu
Alankritha Ammu
Updated on 29-Jan-2020 333 Views

We can fetch all the record from a MySQL table by using SELECT * from table_name; query. An example is as follows, fetched all the records from ‘Employee’ table −mysql> Select * from Employee; +------+--------+ | Id   | Name   | +------+--------+ | 100  | Ram    | | 200  | Gaurav | | 300  | Mohan  | +------+--------+ 3 rows in set (0.00 sec)

Read More

How should I display MySQL database that is currently in use?

Alankritha Ammu
Alankritha Ammu
Updated on 28-Jan-2020 150 Views

We can display the name of MySQL database that is currently in use by Select Database() command.mysql> select database(); +------------+ | database() | +------------+ | tutorial   | +------------+ 1 row in set (0.00 sec)This command shows that we currently use tutorial database.

Read More

How can we edit a java program?

Alankritha Ammu
Alankritha Ammu
Updated on 30-Jul-2019 815 Views

Java programs are simple text-based programs and can be edited using any text editor like notepad etc. The filename should be same as class name.

Read More
Showing 21–27 of 27 articles
« Prev 1 2 3 Next »
Advertisements