Articles on Trending Technologies

Technical articles with clear explanations and examples

Tutorix - AI Tutor

Why is char[] preferred over String for storing passwords?

Sreemaha
Sreemaha
Updated on 24-Feb-2020 276 Views

Yes, Storing password in String object is not safe for following reasons −String objects are immutable and until garbage collected, they remain in memory.String being plain text can be tracked in memory dump of the application.In log, String based password may be printed which can cause a problem.Char[] can be cleared or wiped out after the job is done.

Read More

Converting ArrayList to String[] in java

Fendadis John
Fendadis John
Updated on 24-Feb-2020 582 Views

Following program is converting an ArrayList to String[];Exampleimport java.util.ArrayList; import java.util.List; public class Tester { public static void main(String[] args) { List names = new ArrayList(); names.add("A"); names.add("B"); names.add("C"); String[] nameArray = names.toArray(new String[names.size()]); for(String name: nameArray) { System.out.println(name); } } }OutputA B C

Read More

Convert bytes to a string in java

seetha
seetha
Updated on 24-Feb-2020 701 Views

Use String(byte[]) constructor to convert byte[] to String.Examplepublic class Tester { public static void main(String[] args) { String test = "I love learning Java"; byte[] bytes = test.getBytes(); String converted = new String(bytes); System.out.println(converted); } }OutputI love learning Java

Read More

The most elegant ways to iterate the words of a java string.

Sreemaha
Sreemaha
Updated on 24-Feb-2020 4K+ Views

Just split the string based on space and then iterate it. See the example below −Examplepublic class Tester { public static void main(String[] args) { String test = "I love learning Java"; String[] subStrings = test.split(" "); for(String subString: subStrings) { System.out.println(subString); } } }OutputI love learning Java

Read More

Why use Java annotations?

varma
varma
Updated on 24-Feb-2020 405 Views

Annotations provide information about java elements. Annotations can be interpreted by compiler or IDE at compile time or by JVM at runtime. Annotations can be usedto show attributes of an element: e.g. @Deprecated, @Override, or @NotNullto describe the purpose of an element of the framework, e.g. @Entity, @TestCase, @WebServiceto describe the behavior of an element: @Statefull, @TransactionBefore Java 5, XML was primarily used to store information about java objects, with annotations, this information can be stored within the java code itself.

Read More

How to convert an object x to a string representation in Python?

Malhar Lathkar
Malhar Lathkar
Updated on 24-Feb-2020 345 Views

Most commonly used str() function from Python library returns a string representation of object.>>> no=100 >>> str(no) '100' >>> L1=[1,2,3,4] >>> str(L1) '[1, 2, 3, 4]' >>> d={'a': 1, 'b': 2, 'c': 3, 'd': 4} >>> str(d) "{'a': 1, 'b': 2, 'c': 3, 'd': 4}"However, repr() returns a default and unambiguous representation of the object, where as str() gives an informal representation that may be readable but may not be always unambiguous.>>> str(d) "{'a': 1, 'b': 2, 'c': 3, 'd': 4}" >>> repr(d) "{'a': 1, 'b': 2, 'c': 3, 'd': 4}" >>> repr(L1) '[1, 2, 3, 4]' >>> repr(no) '100'

Read More

How to create a JAR file?

usharani
usharani
Updated on 24-Feb-2020 24K+ Views

You can create a JAR file using the following command.jar cf jar-file input-file(s)  You can also create JAR files using IDE’s. To create a JAR file using eclipse follow the procedure given below.Open the Jar File wizardThe Jar File wizard can be used to export the content of a project into a jar file. To bring up the Jar File wizard −In the Package Explorer select the items that you want to export. If you want to export all the classes and resources in the project just select the project.Click on the File menu and select Export.In the filter text box ...

Read More

HANA Modeling objects and Content folder in SAP HANA Studio

John SAP
John SAP
Updated on 24-Feb-2020 1K+ Views

In SAP HANA Studio, Content folder contains all the design time repository objects. In this folder, all objects created in HANA system are managed under packages. To create a new object, you have to first select a Package.In a package you have different HANA Modeling Views- Attribute Views, Analytic Views, Calculation Views and Analytic Privileges. Each of the object type is managed in different folder in a package.

Read More

Different objects inside a package in SAP HANA

John SAP
John SAP
Updated on 24-Feb-2020 311 Views

Following objects are available in a Package under Content tab in HANA system −Attribute ViewsAnalytic ViewsCalculation ViewsAnalytic PrivilegeStored ProceduresSub-PackagesDecision Tables

Read More

Difference between _SYS_BIC and _SYS_BI schema in SAP HANA

John SAP
John SAP
Updated on 24-Feb-2020 3K+ Views

_SYS_BIC schema in SAP HANA database is used to store column views of all the activated objects in HANA repository.  When an object is created and activated (HANA Modeling views, Stored Procedures), run time objects are saved under _SYS_BIC/Column views in database.These column views are used by front-end tools like BusinessObjects to get the data in a query._SYS_BI:This schema in HANA system stores table created for variables, time dimension- Gregorian, Fiscal and schema and content mapping tables.

Read More
Showing 54781–54790 of 61,298 articles
Advertisements