Tip Bank

DevX - Software Development Resource

Advantages of bool type

Standard C++ supports a built-in Boolean type: Bool. Variables of this type are can be assigned either a true or false values exclusively ( true and false are now reserved

DevX - Software Development Resource

Struct assignment

Both standard C and Standard C++ support struct assignment using = . In fact, C++ programmers are often surprised to discover that assignment operator applies also to plain structs, and

DevX - Software Development Resource

Object I/O

Question: How can i add many java objects to a file then retrieve them as Java objects from the file? Answer: Java 1.1 introduced a concept called serialization. Serialization isa

DevX - Software Development Resource

Constant pointers

There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address, or when you want to protect a pointer from

DevX - Software Development Resource

Namespaces are open

Unlike structs, classes, enums, and unions, the enclosing brace of a namespace definition does not prohibit you from further extensions to that namespace. A namespace can be extended this way:

DevX - Software Development Resource

Single bit assignment

Question: Is there an easy way to assign each bit in a byte, and how do Iaccess those bits individually? Answer: Usually, if you come from a C programming background,

DevX - Software Development Resource

Java OOP

Question: What exactly is a Factory or Factory class? Answer: A Factory is a class that you use to create sets of related objects withoutexplicitly invoking their constructors. You usually

DevX - Software Development Resource

Unix Signal Handling

Question: Is there a way in Java to handle Unix signals(i.e. to trap a Control C signal)? Answer: You can handle Unix signals only by writing native code. However, theJava