How to run a java program?

How to install JDK

Step 1: Open your web browser and go to google.com. Type “jdk” in the search box. Select the first result which would be named “Java SE Downloads”.

  • Install JDK
  • Create java file
  • Compile that java file with Javac command on Dos.
  • Run the generated class file with java command on Dos.

Step 2: Click on the Java icon for Java Platform (JDK)7u10.

Step 3: Accept the License Agreement and select the java installation as per your system configuration.

Step 4: The JDK installer will be saved in the location that you have selected. Double click on the downloaded JDK installer or right click on JDK installer and click on run as administrator.

Step 5: Follow the instructions on your screen to install JDK on your system.

 

The JDK has now been installed on the system. You need to set the path of the JDK in the Environment Variables of the System. Follow the procedure given below to set the path permanently.

Start computer then right click properties–advance system setting–environmental variable–System variable–path–edit

Then type ; and paste the path of the bin folder of JDK in which it is installed, then type then click on ok and close all windows.

Now you are ready to execute java programs in your system.
First you have to write code in any editor like Notepad in Windows OS. Then, save the file with .java extension.
A simple program in java—
class Apple {
public static void main (String []a) {
String name=a[0];
System.out.println(“Welcome  “+name);
}
}
Name of the file is Apple.java
When above line of code executes then it will print “Welcome” on MS-dos
Executing the program—
Open MS-Dos
Directory of the Apple.java file and MS-Dos must be the same for executing the java program.
Now type in MS-Dos javac Apple.java and press Enter.
The java compiler will compile the .java file and create apple.class file.
When Apple.class is generated, type java Apple ayyaz in MS-Dos and press Enter

Then u will see the following Output in MS-Dos.

 

What is Java?

Java Programming

It means that it can run on any platform (any operating system, any hardware) and can be used to develop any type of application like web applications, server applications and desktop applications. The syntax of Java Programming Language is similar to that of C++ programming language.

Code for simple program in C++

#include <iostream>

using namespace std;

int main() {

std::cout << “Welcome to the wonderful world of C++!!!n”;

return 0;

}

Code for simple program in Java

class Apple

{

public static void main(String []a)

{

System.out.println(“Welcome to the wonderful world of java programming”);

}

}

As illustrated above, both the programs in C++ and Java have a main function which is the entry point. C++ uses cout function for printing a statement while Java uses println function for printing a statement.  The rest of the syntax of the Java code will be explained in further posts.

Main Objectives of Java Technology

- Enables users to develop the code easily.

- Java code can be developed and run on any platform that is a certified Java Virtual Machine.

- Increases development speed

- Ability to run more than one block of code at the same time.

- JVM provides high level of security.

The java technology architecture has the following components for achieving its objectives –

- The JVM

- Garbage collection

- The JRE

- JVM tool interface

The java virtual machine Java virtual machine is an imaginary machine that is executed by emulating it in a software or real machine. Code for the JVM resides in .class file that contain code for at most one public class.

Sponsored Video: James Franco teams up with Samsung for their galaxy camera ad campaign

Samsung galaxy camera

Has there been a single time when you thought if your phone camera could be lot better to take better night shots or take shots like the SLR guys do with their long barrel lens? If any of these questions has come to your mind, then Samsung has bought just the camera with you which double like a high end android 4.1 smartphone. And we have got just the right person for this job, James Franco, to promote and team up with Samsung on this revolutionary product.

Most of us know James Franco from the Spiderman series, but he is a person of multi talent, always been doing things more than just acting, like writing, directing, producing, rightly chosen as the best ambassador for representing the mobile which have all the features of a high end camera including slow motion video, buddy tagging and many more.

The most useful feature we want in a digital camera is the zooming feature, and this Samsung Galaxy Camera it the giant in that aspect, it features a 21x zooming power that goes way over anything in that range. The pairing is awesome with James Franco and the mobile camera, most featured in their own line ups and renowned for their performance over the others. Like James Franco has worked with a great success for all these years, the SAMSUNG GALAXY camera is ought to be the same for the years to come with the revolutionary features that has never before present in the market of both camera and mobiles till now.

 This post was sponsored by Samsung.

Why Sony Xperia models are so popular

The word Xperia means experience which you can only get with these decent, responsive, high end Smartphones. The family has twenty one members out of first two are based on windows mobile 6.1 and 6.5 operating system while all the other 19 members are based on the Android operating system. The range of Sony Xperia is a concept phone that is based on high technology and has really got admiration and love from a big crowd of customers.

sony-xperia-j

Not all the family members of the Sony Xperia family are Smartphones, some of them are slider phones, some are candy bar while most of the members have a smart and wide touch screen. Many people have questions in their minds that why Sony Xperia is so popular among mobile lovers? The answer is quite straight forward, anything that a smart, high end, technologically improved phone needs to have are present in the series of Sony Xperia. Sony Xperia has a number of models with different specs but amazing all the specs are highly attractive and fascinating. The range of Sony Xperia mobile phones is designed in the way that can fulfill all the needs and requirements of several groups of customers.

Sony-Xperia-J

According to market and technology experts another reason of the popularity of Sony Xperia series is its Android operating system. The models of Sony Xperia have different versions of Android including Gingerbread 2.3, Ice cream sandwich 4.0, Donut 1.6 and Éclair 2.1. All the models of Sony Xperia come with fats connectivity options like WiFi and Bluetooth, micro SD card, Micro HDMI, audio jack, A-GPS and much more. The lowest strength of Sony’s Xperia series cameras is 3.2MP while the highest is 12MP, means these phones have an ability to cover your video recording and image capturing needs in a better way.

xperia-nxt-series-smartphones

Moreover, not only in terms of functionality the Sony Xperia models are outstanding but when it comes to design and look of these models, they are also outstanding and attractive enough. They are sleek, smart, durable and stylish that can attract customers easily. The popularity of Sony Xperia is reasonable when one look at its features and specs.

Why Nokia sticks to windows and not android

Eos WP8

A number of people including market spectators, customers, Nokia fans and technology experts are wondering, that’s why Nokia is planning to launch Windows phones instead of Android. It is really surprising that anyone wants to follow the market trend in order to maximize profit and it is not possible that only for making a different image a single cellular brand is following quite different and changed the track. There must be something really special for which Nokia is not following the trend of the market.

N8

According to some reports, a very special kind of agreement is signed by Nokia with Microsoft in which Microsoft has offered something really exceptional as compared to Google. On the other hand, Nokia has already made some great devices based on Windows phone 7 operating system and now if Nokia jump to Android it will cost its comparatively high. Another reason of Nokia’s interest in developing Windows phone 7 is that it is a latest and young platform that cab help Nokia to establish a unique and differentiating position while all other cellular companies have just one option that is Android operating system.

Nokia-Windows-E7

Nokia wants to make something creative and not just want to make cases for an operating system as like Android based phone companies are doing while the entire hold is in the hand of Google. On Windows phones Nokia is doing more than just making phone cases, in these mobiles you will find a great ecosystem including powerful hardware, wireless charging, an HD screen, NFC pairing and additional to all these a powerful video and image capturing software and hardware. Nokia can make its position where you can count uniqueness and creativity. However, the key to success is not just being different, it needs something more that Nokia is continuously trying to adapt as Nokia has to compete a range of its rivals as well as to stand out as a successful and unique manufacturer of cell phone technology.

nokiaconcept

Nokia is quite relaxing in making Windows phone and has a contingency plan in case they face failure in windows phone, however the plan B of the Windows is not known yet. Nokia realized that Windows phone is a best option to show their creativity and innovation which is quite difficult to prove in the biggest crowd of Android based phones.

How Motorola got into the Smartphone market

htc pyramid

Smartphones are the best and top choices of customers all around the globe and therefore each mobile  company is trying to create something extraordinary to satisfy their customers as well as to raise their market value. Motorola is one of those cellular companies who always try to adapt things according to the preference of their customers. Motorola has always tried to please their customers in a way they want and therefore in October 2009, Motorola launched its first Smartphone named Droid. It was the first step of Motorola for stepping in the competition of Smartphones.

HTC-HD

Later on, Motorola announced over 20 Smartphones in 2010 and showed its compatibility, creativity and understanding of the market flow. Motorola’s designed Smartphones are usually based on Android and Google operating system, which is a good way to keep the company shares and profit from fast decline as Android operating system is the dominant operating system that every single individual wants to access. As everyone knows that in the past few years the shares of Motorola are continuously declining however Android based Smartphones can help Motorola in establishing a firm and strong market shares.

HTC-Desire

These days the biggest hold over the Smartphones market is with Apple and Samsung however, along with Nokia, Motorola is also trying to get an edge on Smartphones market which seems not too difficult for Motorola Mobility on the basis of their latest Smartphone’s release. Moreover, Motorola is trying to add speed and updated functions into its Smartphones in order to make them unique, attractive and demanding. In this regard Motorola unveiled a latest version of Droid Razr with Intel processor named Razr I in September. In 2007, Motorola has great hold on the market share and these days trying technological specs and innovations are the only way to get back their lost position in the market.

htc_desire

Motorola is doing quite well but it has to beat or compete two big rivals, Apple, Samsung and most recently Sony, so Motorola need to make a bit more innovative, speedy ad technologically advanced devices. Though, Motorola got a space into the Smartphones market however for future benefits Motorola should work on Android based Smartphones which is not new for them and should try to make certain developments, because Android operating system is loved by more than half Smartphones customers.

The best idea to capture market is to do something innovative which people will love to try, like Apple, but Motorola is failing in that part, which needed to be looked into.

Light weight laptops to enlighten your work

Light weight laptops

This year a number of laptops are launched by different manufacturers in different size, colors and specifications, however one thing in all these laptops is same that is its lighter weight.

These days as people become more addicted to technology therefore they prefer devices that are fast, stylish but light in weight so that they can carry it around easily and this forced manufacturers to craft light but high end laptops. New laptops due to their modified designs, sizes, weight and specifications they have got some other names like ultrabooks, notebooks, Toughbooks and MacBook etc. all these styles of laptops are helping business persons and students to complete their tasks in a more elegant and speedy way.

Light weight laptops

Latest technology gave us a couple of very thin, light and fast laptops. These laptops have sizes between 10 to 14 inches and its prices are below $400. Light laptops are also known as budget laptops due to its high performance and great functions and low prices. In the category of latest, smart, fast and light laptops a few names are included Pavilion dv3z, a 13 inch laptop by HP and has a 3.8 pound weight, UC7807U a 13 inch laptop from Gateway, weight is only 5.3 pounds, IdeaPad U330 by Lenovo, a 13 inch laptop, MacBook 13 inch, MacBook Air, Adamo, XPS M1330 and Vastro 13 inches by Dell and Voodoo Envy 133. All these laptops measures lighter weight and great specifications.

Light weight laptops

The specifications of these laptops including decent sound systems, latest processors like Intel’s third generation Ivy Bridge processors and AMD’s dual core processors, small keyboards, HDMI, eSATA ports, USB 2.0 and 3.0 ports, 4GB RAM, extended battery life, 3D gaming, fast internet browsing, DVD drives and burners, HD screen and high quality camera. These laptops have an ability to run different programs while some of them are unable to run even Photoshop. These laptops are suitable to work like emails, web surfing, office related tasks, listening music and creating assignments, however, if you want more than these things from your computer, it is good to search for some other options. It doesn’t mean that lighter laptops are not able to perform well but actually you have to find out some great models that will definitely cost you high.

Light weight laptops

Previously the main idea of laptop was just portability, as the era progressed; speed and processing power also came into the math, as a result numerous brands have their laptops balanced with both light weight and faster processing speed. Previously the assembling word meant only for desktops but now a day’s big manufacturer like Dell allows assembling and building laptop according to your requirement, which are both users friendly and very convenient to buy.

How the iPad differ in design over generations

iPad Design

Apple’s iPad is a tablet computer with an iOS operating system comes with a number of interesting and helpful features. On 3rd April 2010 the first iPad was released, then on 2nd March 2011 iPad 2 was released and finally the 4th generation mini iPad is released on 2nd November 2012. All the three models have a noticeable difference in their size, storage, function, performance and price. Let’s start with the pioneer iPad that was released on 3rd April 2010 by Apple and introduced to the world for the very first time. The iPad features a 9.7 inches Retina, diagonal, multi touch, LED backlit with IPS technology display, 2048X1536 resolution, finger print resistance, A6X dual core, quad core graphics, 1.3MP Facetime front camera and 5MP HD back camera, 1080p HD film recording 16GB, 32GB and 64GB storage options, a height of 9.50 inches, 185.7mm width, 9.4mm depth and 1.44 pound weight, Wi-Fi and Bluetooth technology and lightning connector. In the first model of iPad there was a compatibility of micro-SIM card and Siri intelligent assistant.

iPad Design

The iPad 2 was released in March 2011, though usually latest models come with improvements however, iPad 2 as compared with its predecessor has limited features but is known as a budget model of iPad. The design of iPad 2 was same as the first iPad and features same 9.7 inches, diagonally, LED backlit Retina display with 1024X 768 resolution, same height but 33% thinner and 15% lighter, a better dual core A5 processor, VGA camera, same Wi-Fi and Bluetooth, micro SIM card compatibility, 30-Pin connector and up to 10 hours battery life like its predecessor.

iPad Design

Finally on November 2nd 2012, mini iPad was released with a number of changes and improvements in its function, performance and size. As the name implies, the mini iPad is smaller in size as compared to both of its predecessors. It measures only 7.9 inch, LED backlit different touch screen with similar IPS technology, 7.87 inches height, 5.3 inch width and 0.68 pound weight. It is also finger print resistant and has a faster touch in the comparison with iPad 2. It has a dual core A5 processor, same resolution front and back cameras like iPad one, 720pHD video with front camera and 1080p video recording with its back iSight 5mp camera. The major difference is its compatibility with a Nano SIM card which is quite new technology.

iPad Design

Apple has bent its technology towards mobility with sustaining the best quality picture and video possible in such tablet devices, the only reason has been successful over the year. The design not only is an eye candy but holds the aura of innovation in technology as well as portability and ease of use.

How Nokia mobile changed with time

On the time of its launch, people literally knew any mobile as nokia cause very few brands could reach out worldwide like nokia did. The small hard casings, the unbreakable sturdy body, and uninterrupted service made nokia to where it stands now. But as the Silicon Era progressed, with other brands nokia also changed its design and drastically from the study small common people design to today’s advanced nokia mobiles like N8, Lumina 900 and more.

Nokia Mobile

 In 1979, Nokia introduced a ball rolling radio telephone which was big in size, in 1982; the first car mobile phone was introduced by Nokia that was connected to the car. In the same year Nokia also worked on its first digital telephone switch. Later on, in 1984, another car phone was introduced by Nokia which was comparatively small in size and was named as Mobira Talkman portable phone. Remember, till 1986 all the phones by Nokia were big in size and were connected with some sort of cables.

Nokia Mobile

Finally, Nokia changed its design in 1987 and introduced its first handset Mobira Cityman which was about 800gm in weight, quite heavy. This mobile phone has a price tag of 4,560 Euros and was considered as a symbol of status and class. In 1992, after making the first GSM call by the Finnish Prime Minister on Nokia devices, Nokia introduced the first GSM handset named Nokia 1011. Then in 1994, Nokia modified the look, features and the size of its mobile phones and introduced its first series of mobile phones with the Nokia ringtone tone, the Nokia 2100 series. That was the true beginning of Nokia’s journey towards success and improvements and Nokia got praise from about 20 million people as its customers.

Nokia Mobile

Till 1997, Nokia phones were used or making calls and messaging. In 1998, Nokia launched its first series features web browsing and email processing, 7110. In 2001 a series with built in cameras and in 2002, Nokia released 3650, the first video making device. Nokia gradually moved towards improvements understanding the need of innovations and launched the first 3G mobile phone, Nokia 6650. Today, Nokia mobile phones have a number of styles and features that are the need of today’s fast and technological world. Nokia has a number of Smartphones even has world’s best Windows phones, touch and type, keyboard phones with HD cameras, 3D games, music phones and much more.

Nokia Mobile

Although nokia always used to opt for their Symbian OS, now a day the higher end smartphones are designed to run latest Windows Operating system. Today, the goal of Nokia is to manufacture iOS and Android based phones and it seems possible for Nokia because of its past brilliant track record. Nokia showed its high sense of understanding the needs of changing times and its innovation and creativity in designing such great devices.

Evolving HTC Mobiles in Smartphone Market

 

HTC Mobile

In the beginning, most of the HTC’s Smartphones were based on windows operating system however; in 2009 the company started to developed mobile phone based on the Android operating system, being a part of Open Handset Alliance, a group of mobile makers and mobile network operators devoted to the development of the Android mobile device platform. The name of HTC is considered as one of best Smartphones manufacturers because of their stylish designs, stronger and durable devices and technologically improved handsets. The designs and features of HTC vary with models, you can find thinnest and lighter mobiles, as well as from simple to modify one. Features may include normal to faster touch, HD camera, Flash and much more.

HTC Mobile

In the range of designs and features, HTC has its best creation known as HTC Snap. It is basically a windows mobile phone that is based on Windows 6.1 standard operating system, with 2mp camera, QWERTY keyboard, Wi-Fi, Micro SD slot, Stereo music, Bluetooth and Quad band GSM. The phone is quite simple and good and process and is just designed to connect you with your loved ones. In the same line, HTC has a brilliant creation named HTC ChaCha. The phone is almost same in features and design to HTC snap but is in a bit modified style. It has a 2.1 touch screen, QWERTY keyboard, 5mp back camera, Wi-Fi, GSM, Bluetooth, Web browser with a support to flash, VGA front camera and long battery life. The phone is designed to give you some more options instead of just sending text messages and calls.

HTC Mobile

HTC has a great name and experience in complicated Smartphones and you can easily access a number of Smartphones, that will not only carry a stylish, elegant and sophisticated slim look, but will also able to give you chance to perform different tasks like voice calls, video calls, SMS, MMS, Email, web surfing, HD cameras up to 8mp, video recording, music and movie download, faster Wi-Fi, Bluetooth and a number of other attractive features. You can now simply download games, videos and music files within seconds, and can quickly upload and share images on social networking sites.

HTC Mobile

In the category of high end Android Smartphones, HTC has a wide range and variety of handsets including HTC Sensation, HTC Radar, HTC EVO, HTC One, HTC Incredible and many other names. Many of these Smartphones have 4G fastest and latest technology. In short, HTC has a full understanding of the market and can adopt any trend easily, which has been one of the leading reasons why high end smartphone buyers tend to bend over HTC, rather other android mobile manufacturers in similar price range.