Posts

Showing posts from November, 2015

JDK Installation

How to Jdk Installation  JDK stands for Java Development Kit or sometimes it is also referred as Java Standard Edition Development Kit. JDK is a development environment to develop wide range of applications such as desktop applications, web applications or mobile applications using Java programming language. JRE, Java Runtime Environment, is also part of JDK. JRE provides the minimum requirements for executing a java application. It consists of Java Virtual Machine(JVM) executables, core classes and some supporting files. You can download the latest version of JDK from official website of Oracle. Here is the link. After downloading JDK, double click on the application file and follow these steps for JDK installation. Step 1 : click on Next. Step 2 :There are three features: Development Tools, Source Code and Public JRE. In these, development tools is compulsory and others are optional. You can choose optional features not to install but best way is to install...

java Interview Question

Q1. Why cannot you run standard Java bytecode on Android? A. Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode. We need to convert Java class files into Dalvik Executable files using an Android tool called "dx". In normal circumstances, developers will not be using this tool directly and build tools will care for the generation of DVM compatible files. Q2. Can you deploy executable JARs on Android? Which packaging is supported by Android? A. No. Android platform does not support JAR deployments. Applications are packed into Android Package (.apk) using Android Asset Packaging Tool (aapt) and then deployed on to Android platform. Google provides Android Development Tools for Eclipse that can be used to generate Android Package. Q3. Android application can only be programmed in Java? A. False. You can program Android apps in C/C++ using NDK . Q4. What are Dalvik Executable files? A. Dalvik Executable files have .dex extension and are zipped ...

Java Concept Of The Day

Image
How To Find First Repeated And Non-Repeated Character In A String? Given a string, your code must find out the first repeated as well as non-repeated character in that string. For example, if “ JavaConceptOfTheDay ” is the given string, then  ‘J’  is a first non-repeated character and  ‘a’  is a first repeated character.  Have a look at the below image. How To Find First Repeated And Non-Repeated Character In A String? Step 1  : Define one HashMap called  charCountMap  with  Character  as key and  Integer  as value. This map will hold the characters and their count in the given string. Step 2  : Convert  inputString  to char array called  strArray . Step 3  : Iterate through all chars of  strArray  and update their occurrences in  charCountMap . Step 4  : Iterate through all chars of  strArray  and check their count in  charCountMap . Any first occurri...