Today, most mobile devices come with a GPS module or can connect to one using Bluetooth services. These devices come with support for the Location API for J2ME under JSR-179 that allow J2ME MIDlets applications to query the GPS module for geo-location coordinates. Also mobile applications integrate location based services and one increasingly used it […]
How to use kXML to parse XML files in J2ME projects
kXML is a small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices. The problem for J2ME MIDlets is that there are mobile devices that don’t support the XML API for Java ME additional package (JSR 280). In order to solve this problem, we need an independent and […]
How to parse XML, RSS feed with kXML in a J2ME MIDlet
More an more mobile devices are used to access Internet and connected services. One efficient way to transfer data between different platforms and technologies is to use XML files, which are simple text files formatted accordingly to the XML rules. IN order to process an XML file and to extract needed data you need a […]
Tutorial Java SCJP – #16 Constructors
In a class you can define methods, but there is a special type of methods which are used to solve a particular problem, to construct objects. Constructor methods are special because of their role and because they have a lot rules regarding declaration and usage.
Tutorial Java SCJP – #15 Wrapper classes for primitive types
In Java there are 2 important categories of data types: references and primitives. Most of the time, numeric values, chars and boolean values are used as primitives because it is more efficient as processing speed and memory requirements. Despite that, there are scenarios (like using Collections) when it is needed to store primitive values inside […]
Internet Explorer 9 Is Out
It can be downloaded from http://windows.microsoft.com/en-US/internet-explorer/products/ie/home. It is not available for Windows XP. First impression: it is faster and improved.
Tutorial Java SCJP – #14.2 How to define methods with variable argument lists – var-args
Starting with Java 5.0 you can define methods with variable argument lists (var-args). These methods can be used in situations when you don’t know the exact number of arguments. These is also available in other programing languages and even I is not intensively used, it is a topic for the SCJP exam.
Tutorial Java SCJP – #14.1 What is shadowing a variable
Shadowing occurs when you define a method with input parameters that have names identical to a static variables or instance variables.
Tutorial Java SCJP – #14 Methods and passing variables into methods
In Java, methods define the object behavior or implement different functionalities at class level (for static methods). If variables (value type or references) represent the static part of Java programming,then methods represent the dynamic part because methods are equivalent to code blocks that are executed and that are processing some variables.
How to Consume Web Services from Android Applications Using kSOAP2
Android API does not provide support for Web services. Thus, Web services are consumed using a third-party libraries. One example is kSOAP2 (http://ksoap2.sourceforge.net/), optimized for Android.
Tutorial Java SCJP – #13 Packages and Class access modifiers
Two important concept of Object Oriented Programming is to separate entities based on their functionality or logic and to hide data and behavior within a class (encapsulation). For that you have classes used to define entities that have attributes and a behavior (their methods). At a higher level, for a good organization of the application […]
Service Pack 1 for Windows 7
Service Pack 1 for Windows 7 (and Windows Server 2008 R2) is now available. The update can be downloaded from here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3202ce6-4056-4059-8a1b-3a9b77cdfdda&displaylang=en. It can be also downloaded via Windows Update.
How to skip C++ access modifiers – not real code security
C++ is not a pure object oriented programming language (this topic is just another argument) but it is implementing OOP concepts. On of these concepts is encapsulation: the object hides its contents (attributes or instance variables) by making them private / protected and gives access to them through public methods (like getters and setters).
Tutorial Java SCJP – #12 Immutable, String and Integer
Immutable objects are objects that don’t change their value once they are created. The most known immutable object in Java is String. Besides String, there is another immutable object, and this is Integer (the class and not the primitive) which has an interesting behavior for values between -128 and 127 .
Tutorial Java SCJP – #11 How to use String, StringBuilder and StringBuffer
The most used data types for variables in any programming language are boolean values, numeric primitive values and “strings” (or arrays) of characters. In contrast with C or C++, in Java handling strings is different because: in Java every char is a 16 bit Unicode value, and not 1 byte; in Java, strings values are […]
Tutorial Java SCJP – #10 Variable Scope
Many compiler errors are generated because programmers don’t have a clear image on how long variables are available and when they can access them. The variable scope concept describes the life of a variable, or its availability area, after it was defined.
How to open multiple spreadsheets at once in MS Excel 2007 and 2010
Because there are many users that have wide screens or ones with a high resolution, sometimes it is more efficient to work with multiple Microsoft Excel worksheets that are opened at once. By default, every time you open a new spreadsheet Excel creates a new window for each one. In this case, you must switch […]
Tutorial Java – #9 Garbage collection and memory leaks
Since the first days of computer programs, one important performance issue was the and still is the amount of used memory. Despite the fact that today the hardware technology provide large amounts of Random Access Memory, software developers must pay attention to how they manage the application memory because they can implement wrong solutions that […]
Tutorial Java – #8 Understand Stack and Heap
In order to have a deep understanding of the Object Oriented Programming in Java or any other OOP language (like C#) you must know how things are managed internally by the Java process and by the JVM. Of course Java syntax and Java implementations of OOP principles are important but you will have a more […]
Tutorial Java – #7 Reference data type variables
In this post it is described one of the most important concepts of Object Oriented Programming: Every class instance, object, is managed only by reference type variables (for those who know also C++, you could remember that in C++ this rule is not entirely true because objects are also managed by value type variables). This […]
