Java (Indonesian: Jawa, Indonesian pronunciation: [ˈdʒawa]; Javanese: ꦗꦮ; Sundanese: ᮏᮝ) is one of the islands of the Greater Sunda Islands in Indonesia, bordered by the Indian Ocean to the south and the Java Sea on the north. With a population of 147.7 million (Java only) or 151.8 million (including the inhabitants of its surrounding islands, principally Madura), Java constitutes 56.1 percent of the Indonesian population and is the world's most-populous major island. The Indonesian capital city, Jakarta, is on its northwestern coast. Much of the well-known part of Indonesian history took place on Java. It was the centre of powerful Hindu-Buddhist empires, the Islamic sultanates, and the core of the colonial Dutch East Indies. Java was also the center of the Indonesian struggle for independence during the 1930s and 1940s. Java dominates Indonesia politically, economically and culturally. Four of Indonesia's eight UNESCO world heritage sites are located in Java: Ujung Kulon National Park, Borobudur Temple, Prambanan Temple, and Sangiran Early Man Site.
Formed mostly as the result of volcanic eruptions from geologic subduction between the Sunda Plate and Australian Plate, Java is the 13th largest island in the world and the fifth largest in Indonesia by landmass at about 138,800 square kilometres (53,600 sq mi). A chain of volcanic mountains forms an east–west spine along the island. Four main languages are spoken on the island: Javanese, Sundanese, Madurese, and Betawi, where Javanese and Sundanese are the most spoken. Only two ethnic groups are native to the island—the Javanese in the central and eastern parts and Sundanese in the western. Most residents are bilingual, speaking Indonesian (the official language of Indonesia) as their first or second language. While the majority of the people of Java are Muslim, Java's population comprises people of diverse religious beliefs, ethnicities, and cultures.Java is divided into four administrative provinces: Banten, West Java, Central Java, and East Java, and two special regions, Jakarta and Yogyakarta.
I've made a virtual solar system in Java3d. I'm trying to implement the orbiting of planets and ships. I get the basic formula F = G((m1*m2)/r^2))[\code] and saw a discussion here about the formula in 3d but, I don't know how to read a letter with an arrow over it, lol. Can someone help me...
Hey so I have to compile a project... there are two parts to it, one where I just have to display a series of sentence and another one a bit more complicated... I am using tutorialspoint.com because I don't have any compiler on the desktop at school :/ It is unfortunately giving me this error...
Hey so I have to write a program that does the following for my class ( Object oriented programing 1, so basic stuff really...)
An online music and apps store offers all apps for 3$ each and all songs for 7$ each. The store
requires members to prepay any amount of money they wish, and then...
(Java) How to make a program that will reload without erasing the variable data?
How do you make a program in Java that will reload and won't erase the variable values (objects, strings, double, int, arrays and etc.)?
And also, what program ideas would you suggest me (beginner programmer) so...
Should the project name of my Java application must be the same as the name when I save my Java application? Because I'm using Netbeans IDE 8.0.2 and in the project name field, I put First Java Program and after I wrote the Java application, when I save it, I put GetStarted.java in the save as...
I wrote a very simple Java application in Notepad++ and saved it in the Documents inside of File Explorer. Then I opened the command prompt and typed javac GetStarted.java but it says 'javac' is not recognized as... So how do I compile this?
I am learning classes and objects, and I don't get how ".this" works in Java. I don't know what it is used for and how to use it.
My book that I am learning from doesn't do a good job of explaining how ".this" works. The book is: Java The Complete Reference 9th Edition.
Hi, I'm currently working on my selection sort code, and I've come across some problems.
i
import java.util.Arrays;
import java.io.*;
public class SelectionSort
{
int a[];
static int n;
public static void main(String[] args)
{
int array[] = { 5,3,9,7,1,8 };
n = 6...
I'm using Windows 8 and I have Notepad++ for coding in Java but I need a development kit for Java that can compile and run Java. I went to the website java.sun.com to download J2SE but it doesn't work.
Can you please recommend me some good websites for learning Java? Or some books for learning Java? Since I don't have a Mac and I'm using Windows, I want to learn Java in order to develop Android game app. Is the book "Head First Java" a good one for beginners to learn Java? Or would you...
It's a well known fact that those mechanical engineer, civil engineer , EE engineer are regarded as professional. Is IT consultant and computer programmer considered as professional as well?
I am programming in Java, creating a window application. I used notepad++ and compile through the command line. The program compiles and runs fine through the command line
However I want to create an executable file, so I downloaded jsmooth
But it is giving me this error and I can't really...
Homework Statement
import java.util.Scanner;
import java.util.Random;
public class Passwords
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
Random r = new Random();
System.out.println(" Password...
Consider the following java code
int a=1;
if (a != 0)
{
int a=3;
}
System.out.print(a);
What is the output
A. 0
B. 1
C. 3
D. No output. A compilation error occurs
The answer is B. I want to ask why the output shown will not be 3. As the 1 is not equal to 0, should the ' int a '...
We are asked to make a program to prompt the user to choose between calculating the perimeter of a circle or triangle. We are supposed to use at least 5 methods. I believe I have created the appropriate methods but my real problem is with method calling.Homework Equationsimport java.util.*...
Hey everybody,
I need to learn Java for a course I'm taking in the spring(my C++ course fulfills the prereq for our java intro to data structures course) and I need to get a working knowledge of java. I've been reading the book for the class I'm not taking, but it's essentially built around a...
I am trying to capitalize the first letter of every word in a sentence.
Example. "hey what's up" would be "Hey What's Up".
here is my code but nothing is changing the sentence. I thought everything was right.
public static String cap(String aString) {
String[] sentence = aString.split("...
I'm not sure if I came to the right place/forum to ask this question, but I have a programming assignment and I need help on one of the question. It's part of the Peking University's online judge questions. It shouldn't be hard for people who understand it.
Link: http://poj.org/problem?id=1005...
1. Problem: The task is to import an excel (.csv) file containing monthly weather data and produce a programme that can execute different averages on a yearly basis. i.e.;, produce average rainfall, maximum or minimum temperatures for desired years.
I have thus far managed to calculate average...
Why is this java code wrong? I'm unsure why java won't recognize radius and height. Both should be fields for any object of the Cylinder class. My declaration for PI may be off, but that doesn't produce an error.
public class Cylinder {
public static final double PI...
Homework Statement
Hey everyone, I have a question regarding file IO in java.
My assignment says: Extend program 2-add menu items Open(reads employees from a file),Save(writes employees to a file already specified), and Save As(writes employees to a new or different file than the one...
When I was a (very lonely) child, I used to play endlessly with this predator-prey simulation game:
http://www.leinweb.com/snackbar/wator/
(You may have trouble getting this applet to run based on java updates, other security settings and what not).
There is more information about it here...
Homework Statement
A 10nC, 1µg particle is fired into a magnetic field as shown. Distances are in millimeters, time is in seconds. What is the strength of the field? (See my picture for additional information and my worked solution)
Homework Equations
f= mv^2 /r F(from B field) =...
I'm trying to learn java. So I'm practicing what I've learned so far by making a calculator to do formulas I learned in my finance class.
But it's not working right now.
case ("loan length"):
Scanner inp_ll = new Scanner(System.in);
System.out.print("What is the monthly...
I am reading an input file that has blank lines. x reads character by character. x is equal to a new line so it goes into the while loop but skips the if x == '\n'. It's suppose to go inside the if statement but it doesn't. I tried debugging the code and printed out to double check x is holding...
Can't open java applets :(
I just visited thishttp://www.astro.ucla.edu/~wright/Balloon2.html and found that I can't open the java applet.
I encountered this:
Then I tried opening applets from other websites and tried using firefox.This is the result from firefox and chrome.
From where can...
Can someone tell me what they think this is referring to?
On the create event for a form add 3 animal instances to a list.
A form just meaning a GUI? and what does it mean on the create event? Clicking something to add the animals perhaps?
Homework Statement
Create a SortedLinkedList class which implements the LinkedListInterface.
Remember to use the Comparable class
Basically, I need to implement a sorted linked list that uses generics and uses compareTo to sort objects. I need it to be able to sort names...
Using the following code:
Set<Map.Entry<String,JsonElement>> mySet = jsonObject.entrySet();
for(Map.Entry<String,JsonElement> singleItem : mySet)
{
singleItem.getKey();
System.out.println("Set values: " + mySet);
}
mySet gets printed to the console as:
Set values...
I'm new to Java. My high school CS teacher requires an MLA-style comment block before the first package declaration in our programs, I was just wondering how I might change the default opening comment block.
I'm using NetBeans 7.4. I did some searching and I couldn't find much help. I mean I...
You have been commissioned by the US Navy to develop a system for tracking the amount of fuel consumed by fleets of ships. Each ship has a name (ex: "Carrier"), fuel capacity (the maximum amount of fuel the ship can carry), and amount of fuel currently onboard. In this problem, fuel is measured...
I was forced into learning Java. I feel reasonably fluent in C++, so the main problem is with the differences between the way languages are designed.
There are no global variables in Java. However, I need one - or at least some equivalent. I have something like a database object that I want...
I have been trying to implement this Wave equation into java:
A = amplitude of wave
L = wave length
w = spatial angular frequency
s = speed
wt = temporal angular frequency
d = direction
FI = initiatory phase
Y(x,y,t)=A*cos(w *(x,y)+ wt*t + FI;
I...
Hello
I am not a programmer or anyone.
I want to make a game based this code
public int[] createBackGroundMap2(int paramInt1, int paramInt2)
{
int[] arrayOfInt = null;
if (paramInt2 == 4) {
arrayOfInt = new int[] { 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2...
Homework Statement
Develop a Heapsort algorithm using java
Homework Equations
The Attempt at a Solution
I have been trying to implement HeapSort in java. Unfortunately I am running into errors. I am printing out the index values and they go up then down and the code does not sort properly. Can...
On my app there are two rows that holds 3 images each (as seen in the image attachment). In the beginning, the 6 images are loaded and then when a person touches one of the images I want the other 6 images to be loaded. It's a series of choices. Ex. First 6 images would be to pick what day it...
In the main activity, I call one of the constructors:
public Something()
{
//nothing initalized
}
public Something(7 variables)
{
... (this.variable = variable)
}
public Something(10 variables)
{
... (this.variable = variable)
}
I call the 7 variable one but the...
I tried searching difference between instantiation and initialization but all results were about either variables or objects.
But what about methods? Are methods instantiated or initialized?
static methods?
instance methods?
Thanks
Homework Statement
I am creating an astrophysical simulation involving an arbritary number of particles and each particle is identified via a mass, label, position vector and velocity vector. I have made classes which can perform operations on these vectors and I also have a class which...
Im using Eclipse and I have an input file name that I am reading from but for some reason when the program ends there is no output file that gets created? Does anyone know what I am doing wrong here?
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter...
I have an if-else piece of code involving strings
String color = sc.nextLine();
if (color == "R" || color == "r"){
System.out.println("red");
}
else if (color == "G" || color == "g"){
System.out.println("green");
}
else if (color == "B" || color == "b"){...
Let's say a method or constructor has multiple parameters example in DecimalFormat --
public final StringBuffer format(double number,
StringBuffer toAppendTo,
FieldPosition pos)
if you don't declare all of the parameters, what happens to those that are not...
Hi, I am programming a command line program in Java. When I try to use System.out.print to print a single quote character, it outputs æ instead. So I get output like
Johnæs height is 1.72 m
instead of John's height is 1.72m
I tried using escape sequence and i get illegal escape...