Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- java



  Different types of keystore in Java -- BKS

BKS is a keystore format provided by the popular third party Java cryptographic library provider -- BouncyCastle. It is a keystore similar to the JKS provided by Oracle JDK.  Before starting to use BKS, the BouncyCastle provider has to be downloaded and installed. To download the provider, please go to BouncyCastle download page. The provider can be installed by adding an entry in the java.security file. security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider N means the pr...

   JAVA,KEYSTORE,BOUNCYCASTLE,BKS     2016-07-03 03:00:18

  Can API be copyrighted? At least Oracle hopes so

  The result of the lawsuit case war between Oracle and Google is clearer now. The court said that 9 lines of code of Android has violated intellectual property right, these 9 lines of code can be ignored relative to the number of codes for the whole Android system. But just like LinuxToy points out that the reasons why this case catches so much attention are : 1). The amount of money Oracle asked from Google is $1 billion; 2). The statement says Java language itself doesn't violate the int...

   Oracle,Google,API,Copyright,Lawsuit case     2012-05-11 00:47:58

  Use Memory Analyzer Tool in Eclipse

When developing applications, we often encounter memory issues of an application. To analyze how much memory each class takes, we need to have some specific tools to assist us. One of them is Memory Analyzer Tool on Eclipse. The Eclipse Memory Analyzer is a fast and feature-rich Java heap analyzer that helps you find memory leaks and reduce memory consumption. To use the Memory Analyzer Tool, you first need to install it on Eclipse. You can go to Help -> Install New Software.... Paste  h...

   Memory analyzer tool, Eclipse,heap dump, HPROF     2014-10-28 07:22:35

  Haxe: Another multiplatform language

There are two kinds of programmers: One is using different languages to solve problems, the other is inventing languages to solve problems. Haxe is an emerging open source programming language which is universal, powerful and easy-to-use. Some languages claimed they were multiplatform languages, such as Java, C# and ActionScript. They all are based on some platforms, Java has JVM, C# has .Net and ActionScript has Flash Player. While Haxe is a trule multiplatform language, it can be used to devel...

   Haxe,Multiplatform,Open source     2012-06-11 08:08:28

  Are frameworks making developers dumb?

Last week I got to take interviews to hire senior java developers with around 5 years of experience. But after the interview process is over I felt like the frameworks makes developers life easier but at the same time making them dumb.Everyone puts almost all the new frameworks on their resume claiming they have "Strong, working experience on Spring, Hibernate, Web Services etc".Here is how the interviews went on.Me: You have used Spring in your latest project. What are the advant...

   Framework,Importance,Disadvantage,Easy     2011-09-06 08:10:08

  Command Line Arguments

Our Hello program still isn’t very general. We can’t change the name we say hello to without editing and recompiling the source code. This may be fine for the programmers, but what if the secretaries want their computers to say Hello to them? (I know. This is a little far-fetched but bear with me. I’m making a point.)What we need is a way to change the name at runtime rather than at compile time. (Runtime is when we type java HelloRusty. Compile time is when w...

   Java,Command line arguments,First elemen     2011-09-30 11:31:54

  Fastjson just fixed a bug which might cause out of memory issue

Fastjson just fixed a bug which might cause service down a few days ago. This bug is caused by some mishandling of special character \x which is an escaped character to indicate hexdecimal number. The impact of this bug would be big if the attacker constructs a malicious data which would cause the service down.  The code which causes the issue is in com.alibaba.fastjson.parser.JSONLexerBase#scanString, when a JSON string is passed in, fastjson would parse the string character by c...

   FASTJSON,ALIBABA,BUG,NEWS     2019-09-07 06:03:49

  Difference between Enumeration and Iterator in java interview question and answer

This tutorial explains about what are the differences between Iterators and Enumeration and similarity of both interface which may be asked in a core java interview. Functionalities of both Iterator & Enumeration interfaces are similar that means both generates a series of all elements of the object which is to have its values iterated that can be traversed one at a time using next() method incase of Iterator and nextElement() method incase of Enumeration. The more powe...

   Java,Iterator,Enumeration     2012-05-01 07:41:52

  Why 0.1+0.2 != 0.3

In programming languages such as JavaScript, c/c++, Java and Matlab, you will find that you will get unexpected result when doing float point calculation. For example, when calculating 0.1 + 0.1, you will not get 0.3: > 0.1 + 0.2 == 0.3 false > 0.1 + 0.2 0.30000000000000004 Don't be surprised of this result, this is the end result of IEEE 754 standard, float point number cannot be accurately represented according to IEEE 754 because: No enough memory is allocated for representing the num...

   float point,comparison,JavaScript     2014-11-19 05:32:46

  One good way to use optional parameter in function

In GoLang, it doesn't support method overloading like in Java, hence sometimes it would be a headache to create functions to construct new structs with different parameters.  Normally, we would construct the new function as below when want to let others create a new struct instance with explicit function call. type Queue struct { Name string } func NewQueue(name string) *Queue { return &Queue{name} } But with the scope and complexity of the struct increases, there might be more prope...

   OPTION PATTERN,VARIADIC FUNCTION,OPTIONAL PARAMETER     2020-09-18 21:45:29