Skip to content

Tag: c++

Multilanguage development

I would like to develop an application with two languages. Actually, the goal is to generate two differents application, one with a language (Java), the other on in another language (C#). I would like to use makefiles to help me generate one application or the other one, thanks to targets definition. I don&#8…

C# DateTime.Ticks equivalent in Java

What is the Java equivalent of DateTime.Ticks in C#? What will be the equivalent of above mentioned code in Java? Answer Well, java.util.Date/Calendar only have precision down to the millisecond: That’s the nearest effective equivalent. If you need to convert between a .NET ticks value and a Date/Calend…

Java’s enum… Where are they created?

Since enum in C# are on the stack, I was wondering where enum, in Java, where created. On the stack? On the heap? In some mysterious other place? Enumeration in C# are more primitive than those in Java, this might explain why they are created on the stack… Where are they? I can’t find them! Thanks…

C# Java HashMap equivalent

Coming from a Java world into a C# one is there a HashMap equivalent? If not what would you recommend? Answer Dictionary is probably the closest. System.Collections.Generic.Dictionary implements the System.Collections.Generic.IDictionary interface (which is similar to Java’s Map interface). Some notable…

Can I pass parameters by reference in Java?

I’d like semantics similar to C#’s ref keyword. Answer Java is confusing because everything is passed by value. However for a parameter of reference type (i.e. not a parameter of primitive type) it is the reference itself which is passed by value, hence it appears to be pass-by-reference (and peop…

Regex for tree structures?

Are there regular expression equivalents for searching and modifying tree structures? Concise mini-languages (like perl regex) are what I am looking for. Here is an example that might clarify what I am looking for. An operation that would be possible on the above tree is “move subtree at node 2.1 into t…