Home » Author Archives: Ilias Tsagklis

Author Archives: Ilias Tsagklis

Ilias Tsagklis
Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.

How to Read an Object from File in Java

In the previous tutorial we saw how to write an Object to a file in Java. In this example we are going to see how to read an Object from the file that we’ve stored it earlier. Basically, to read an Object from a file, one should follow these steps: Open a FileInputStream to the file that you’ve stored the ...

Read More »

Change File Last Modified date in Java example

In this example we are going to see how you can change the “Last Modified” date of a File in your File System in Java. We are simply going to use the setLastModified method of the File class. We are also going to see how you can parse a string with a date format to a Date object which is ...

Read More »

4 Ways to Copy File in Java

Although Java offers a class that can handle file operations, that is java.io.File, it doesn’t have a copy method that will copy a file to another. The copying action is an important one, when your program has to handle many file related activities. Nevertheless, there are several ways you can perform a file copying operation in Java and we will ...

Read More »

Android : How to check if device has camera

In this tutorial we are going to use  PackageManager and the hasSystemFeature method to find out whether our device has a Camera or not. Of course there are plenty of things you can find out about the device using the same tools. For this tutorial, we will use the following tools in a Windows 64-bit platform: JDK 1.7 Eclipse 4.2 Juno ...

Read More »

Android: How to set default activity

In Android you might create many Activities for your Application and you want to choose which one of these will be launched when the Application starts up. In other words which Activity will have the role of the main Activity of your Application. You can do that by creating an Intent filter in the AndroidManifest.xml file of your Project. The AndroidManifest.xml file ...

Read More »

How to get IP address in Java using InetAddress

An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. The designers of the Internet Protocol defined an IPv4 address as a 32-bit number. In this tutorial we are going to see how can you get the IP Address that is ...

Read More »

How to Convert InputStream to String in Java

In this tutorial we are going to show three different methods that you can use in order to read a file and convert it to String in Java. The way to read a file with Java is pretty straightforward, you use an FileInputStream. But sometimes you might want to perform several operations in that Stream, for example you might want ...

Read More »

Android ListView Example

One of the most usefull layouts in Android is the ListView. ListView allows you to arrange your items in a scrollable list. Of course you can customize the list, and you can populate it dynamically in your code. In this tutorial we are going to see how ListView and ListActivity works. This tutorial has two parts. In the first part you are going to see the ...

Read More »

Android TableLayout Example

In Android there are may ways you can arrange the components of your Application on the screen. One of the most common layouts is the TableLayout. In this tutorial we are going to see how TableLayout works with some input components. A very common use case of the TableLayout is, of course, when you want to present tabular data (statistics for example…) ...

Read More »

Android RelativeLayout Example

In Android there are may ways you can arrange the components of your Application on the screen. One of the most common layouts is the RelativeLayout. In this tutorial we are going to see how RelativeLayout works with some input components. There is a good reason why it’s called RelativeLayout. That’s because it let’s you arrange the components on your screen in positions relative ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns