Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Sunday, March 20, 2011

Array in java

In programming languages, an array is a way of storing several items (such as integers). These items must have the same type (only integers, only strings, ...) because an array can not store different kinds of items. Every item in an array has a number so the programmer can get the item by using that number. This number is called the index. In some programming languages, the first item has index 0, the second item has index 1 and so on. But in some languages, the first item has index 1 (and then 2, 3, ...).

When the programmer creates an array, he/she must give the size of the array. This is the number of items that can be stored in the array. If the programmer wants to store more items then he/she must create a new array. This is because the size of an array can not be changed.

class ArrayDemo {
public static void main(String[] args) {
int[] anArray; // declares an array of integers

anArray = new int[10]; // allocates memory for 10 integers

anArray[0] = 100; // initialize first element
anArray[1] = 200; // initialize second element
anArray[2] = 300; // etc.
anArray[3] = 400;
anArray[4] = 500;
anArray[5] = 600;
anArray[6] = 700;
anArray[7] = 800;
anArray[8] = 900;
anArray[9] = 1000;

System.out.println("Element at index 0: " + anArray[0]);
System.out.println("Element at index 1: " + anArray[1]);
System.out.println("Element at index 2: " + anArray[2]);
System.out.println("Element at index 3: " + anArray[3]);
System.out.println("Element at index 4: " + anArray[4]);
System.out.println("Element at index 5: " + anArray[5]);
System.out.println("Element at index 6: " + anArray[6]);
System.out.println("Element at index 7: " + anArray[7]);
System.out.println("Element at index 8: " + anArray[8]);
System.out.println("Element at index 9: " + anArray[9]);
}
}


The output from this program is:


Element at index 0: 100
Element at index 1: 200
Element at index 2: 300
Element at index 3: 400
Element at index 4: 500
Element at index 5: 600
Element at index 6: 700
Element at index 7: 800
Element at index 8: 900
Element at index 9: 1000

ex.Array 2d

class DemoArray2D {
public static void main(String[] args) {

int[][] duaD = new int[2][3];

int k = 1;
for(int i=0; i<2; i++) {
for (int j=0; j<3; j++) {
duaD[i][j] = k * 10;
System.out.print(duaD[i][j]);
if (j < 2) System.out.print(" ");
k++;
}
System.out.println();
}
}
}
Selengkapnya...

Thursday, March 17, 2011

Top n Best Browser

A web browser or Internet browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of content.[1] Hyperlinks present in resources enable users to easily navigate their browsers to related resources.

Although browsers are primarily intended to access the World Wide Web, they can also be used to access information provided by Web servers in private networks or files in file systems. Some browsers can also be used to save information resources to file systems.

Rank
1. Mozilla Firefox

mozilla is amazing, this is because it makes your pc run faster ,you can do more things with it, before you run things yo have downloaded it askes you if you would like to scan it and also you can get some amazing add ons

DOWNLOAD!! Mozila Firefox Setup 4.0

2. Google Chrome

Google is looking to plug the gaps in its cloud computing universe with its new browser, Chrome, which many believe could be a serious competitor to Microsoft's IE and Mozilla's Firefox. The browser was made available overnight for free download, in beta form, and after a couple of hours' use, it looks to be a decent addition to the web arsenal - especially when it's in full-release form.

3. Internet Explorer

Microsoft has recently released Internet Explorer 8 Beta 2, an impressive update for a software that stagnated in the past years. Internet Explorer 8 looks more elegant and easier to use, while adding many of the missing features. IE8 adds support for suggestions in the search box and this is not restricted to Live Search. Microsoft lists many search providers that can be added: Google, Yahoo, Wikipedia and others.

4. Opera

Find all top features preinstalled. No need to install add-ons! .Use the Web at high-speed with the fastest and safest browser available. Easy to use, yet fully customizable. You can even remove your addressbar and make your browser look pink, if you like it.Search in a flash using the integretad search field and search shortcuts in your addressbar. Save time when filling out forms with the Wand password manager. Speed Dial displays previews of your favorite web sites everytime you open a new tab. That allows you to navigate even faster.

5. Safari

Safari has one big issue, namely how it handles cookies. Safari stores and searches cookies in a linear way, so if you do not clear your cookie jar every once in a while, websites that check for cookies might cause your computer to slow down as they have to linearly search through every cookie. In case you're wondering, most websites check for cookies. Multiple times every page. That aside, Safari has a very nice way of handling RSS feeds, much better than Opera, IE or Firefox in my opinion. It is also native with OS X, meaning that you can preview PDFs and other stuff without external plugins.



6.SeaMonkey

SeaMonkey is an all-in-one internet application suite. It is a browser, an email client, IRC and it can let you create static webpages too. SeaMonkey is part of Mozilla Foundation and although Mozilla’s main focus is on Firefox & Thunderbird but many volunteer’s are trying to make an all-in-one internet application based on Mozilla’s technology and that’s where SeaMonkey was born. Lets find out how good or bad it is…


7. Flock


That’s why we’ve been working so hard on our Flock 2 Beta, and our audience of loyal Flockstars has been growing so quickly. Everybody loves the latest improvements Mozilla’s Firefox 3 technology: much improved performance, tighter security and improved usability. However, what if you could have all of those great features AND all of the award-winning innovations that Flock offers? (That would be the integrated People, Media, WebMail, Photo Uploader, Blog Editor, Feed Reader, and more.) Today, we’re making our second beta of Flock 2 available for everyone to enjoy, and you can take your browsing experience from great…to UN-BE-LIEVABLE for free.


8. Avant


The browser is sufficiently fast, preloaded with two dozen similar skins as well as tabbed browsing and modular toolbars that let you move around and hide the Status bar, Toolbar, Search window, and navigation controls. The Menu bar, though, is counterintuitively pinned to the upper-right corner, and icons for proprietary functions, such as an in-page search term highlighting toggle, aren't instantly comprehensible.

9.Netscape Navigator

In addition to high-speed browsing and instant-messaging capabilities, Netscape features one-click searching from the address bar; Quick Launch, which reduces the browser start-up time; Click-to-Search, which allows users to select a word within a Web page and search; improved instant messaging, including support for buddy icons, file transfers, and buddy alerts; and tabbed browsing, which allows users to view multiple Web pages in a single browser window.
Version 9.0.0.5 includes unspecified updates.

10. Maxthon

Maxthon IS basically Internet Explorer with a different interface. I think it is somewhat more secure, especially maybe now using the newer IE7 engine. It's really fast and stuff. It's only not my default browser because I hear so many bad things about IE's engine and it scares me off. But I'm paranoid. Maxthon with good security utilites should be fine and it's a great browser.


Mozila Firefox Setup 4.0

2. Google Chrome

download opera

download safari 5.0.4

download Seamonkey

download flock 3.5.3

download avant

download netscape navigator 9.0.0.9

download Maxthon 3.0.21.1000
Selengkapnya...

Tuturial C++

C++ is one of the most popular programming languages and its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Several groups provide both free and proprietary C++ compiler software, including the GNU Project, Microsoft, Intel and Embarcadero Technologies. C++ has greatly influenced many other popular programming languages, most notably C# and Java.

C++ is also used for hardware design, where the design is initially described in C++, then analyzed, architecturally constrained, and scheduled to create a register-transfer level hardware description language via high-level synthesis.

basic C++

// my second program in C++
#include
using namespace std;
int main ()
{
cout << "Hello World! "; cout << "I'm a C++ program"; return 0; } this output program "Hello World! " "I'm a C++ program"
Selengkapnya...

Monday, August 23, 2010

Java

Java adalah bahasa pemrograman yang dapat dijalankan di berbagai komputer dan telepon genggam. Dikembangkan oleh Sun Microsystems dan di publikasikan tahun 1995. Java tidak boleh disalahpahami sebagai JavaScript. JavaScript adalah bahasa scripting yang digunakan oleh web browser.

hal dasar yang di perlu ketahui dalam bahasa ini adalah variabel,function,prosedure

Contoh Kode Program Sederhana Dalam Java

Contoh program Halo dunia yang ditulis menggunakan bahasa pemrograman Java adalah sebagai berikut:

public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, world!");
}
}

maka hasilnya adalah Hello,world!

Contoh Variabel adalah String,Integer,Double,Boolean, dan masi banyak lainnya..
Tapi untuk dasar pembelajaran java cukup hanya itu saja dulu..

Conronhnya String = String = "Contoh string";
Contoh Integer = int a = 6; (Didefenisikan sebagai konstan)
int keliling = pxl; (Disefenisikan sebagai fungsi)
int a = Integer.parse(JoptionPane.showInputDialog,(null"Masukkan nilai a"))
Contoh Double sama aja dengan Integer , tetapi harus diingat bahwa double biasanya dipakai untuk pembagian. jadi dapat di simpulkan Double ini angka yang memakai koma.

Boolean berguna untuk melihat kondisi , benar atau salah
Selengkapnya...