Connecting...

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Java
For more information, please see full course syllabus of Java
Java Working with Java
Lecture Description
In this lesson our instructor talks about working with Java. First he gives a brief history of Java. Then, he talks about the requirements of Java, Java's two-step process, java application creation, and importing classes. After that, he discusses arithmetic rules of precedence and four more program examples.
Bookmark & Share
Embed
Share this knowledge with your friends!
Copy & Paste this embed code into your website’s HTML
Please ensure that your website editor is in text mode when you paste the code.(In Wordpress, the mode button is on the top right corner.)
×
Since this lesson is not free, only the preview will appear on your website.
- - Allow users to view the embedded video in full-size.
Next Lecture
Previous Lecture
0 answers
Post by idztku on November 7, 2022
How can we run this Java program via Windows? I think you mentioned Bash terminal for Mac, thus i cant figure out how to do for Windows?
0 answers
Post by Scott Yang on July 10, 2019
you are so lucky it wasn't the last day of August. it might say August 32 as tomorrow's date if you did it one day later
0 answers
Post by Scott Yang on July 10, 2019
What if it is the last day of the month? like October 32?
0 answers
Post by Farrukh Awan on October 17, 2018
The video is not working after 18 minutes. Please fix this.
0 answers
Post by Liang Will on March 19, 2017
The video isn't working after 18 minutes. There's nothing wrong with my wifi. Help please.
1 answer
Last reply by: Kitt Parker
Fri Jul 10, 2015 11:59 AM
Post by Elvis Wodi on February 18, 2015
encountered another error message on the replace exercise on this line
String newText =text.Replace('', '-'); // motify the string. saying empty character literal. unclosed character literal. what should i do
1 answer
Last reply by:
Tue Mar 17, 2020 3:44 PM
Post by Elvis Wodi on February 17, 2015
What are %d
and %f
? In the circle example why are we using %d
for diameter and %f
for area and circumference? What is the difference between %d
and %f.Also on the search code i tried following the steps you gave but i encountered and error message on this line (int index =0;)as it says the assigned value is never used.What that mean and how do i go about solving that problem.
1 answer
Last reply by: Jerry Liu
Sun Jun 22, 2014 10:29 PM
Post by Rita Sobiech on September 27, 2013
It isn't going to matter you are coding on a MAC and I have a PC is it?
1 answer
Last reply by: Arshin Jain
Wed Aug 27, 2014 4:09 PM
Post by Tarique Islam on July 16, 2013
I downloaded and setup netbeans (under Windows 8 OS). It works with the simple Hello world stuff..Below is the program:
package myfirstjavaprogram;
/**
*
* @author Owner
*/
public class MyFirstJavaProgram {
int n;
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
System.out.print("Hello world!
");
}
}
But when I typed the "Import.util.Scanner;"
It gives me error! I tried it on the top, as well as within the package statement..
Help
0 answers
Post by joseph kirksey on April 7, 2013
Is Java a good language fer beginners? i've read a little about C++ but the Syntax can be a bit overwhelming for me as a beginner.
1 answer
Last reply by: Phil Wyder
Mon Mar 18, 2013 2:57 PM
Post by Rumman Ahmed on February 17, 2013
What are %d
and %f
? In the circle example why are we using %d
for diameter and %f
for area and circumference? What is the difference between %d
and %f
?
0 answers
Post by Donna Parcel on February 1, 2013
Can you tell me what I'm doing wrong--I downloaded the 4 programs circle, search, find&replace, and calendar and tried to run them in JCreator, NetBeans and they won't run -- I get all kinds of errors.
Thanks Donna
0 answers
Post by anuj singh on January 20, 2013
I am getting error with the dot operator when i try to compile the calendar program on dos what can be the possible reason ?
0 answers
Post by Harlan Reece on December 30, 2012
I tried running the circle program through Netbeans with partial success. My compile was successful, but I did not see a prompt to enter data in the output window. In addition to this problem, I do not see an option to set as Main project option. Is there a preference option where I can set this. When I type enter my project name, it does not simultaneously provide a .Main extension in the Create Main Class field as it does in the video, but rather creates an extension with the exact same name as the project file. What am I doing wrong. Had absolutely no success in running program from DOS prompt. What am I doing wrong?
0 answers
Post by Patricia Edwards on November 11, 2012
in the command line
index = str.indexOf("c");
is the index of str.indexOf the same index as the variable initialized to 0 in the statement above? How does that work?
1 answer
Tue Nov 13, 2012 5:03 PM
Post by Jozsef Kovacs on October 30, 2012
Where can I find java.util.Scanner?
2 answers
Last reply by: Elizabeth Etta
Tue Nov 13, 2012 2:19 PM
Post by Dalbir singh on August 26, 2012
In Circle Geometry example: line 17, 18, 19 why use System.out.printf? why not System.out.println? and how do we know which one to use and when?
3 answers
Thu Nov 1, 2012 2:39 PM
Post by george masih on June 11, 2012
scanner sc = new scanner(system.in);
statement is not working i am using ecllipse editor.any body call tell what is wrong with that?
1 answer
Last reply by: Loammi Pedroza
Tue Apr 16, 2013 8:36 PM
Post by Kwasi Roberts on March 29, 2012
On line 13 on the "Find and Replace" section can you explain tht whole line especially text.replace please?
0 answers
Post by Thomas James Hanrahan on September 29, 2011
Because for some reason the java.util.Calendar; causes the output to be one month behind. I guess that is why you always try to "Break" your code once its complete so you don't run into problems like this.
with +1
Today's date is;9-29-2011
Tomorrow's date will be: 9-30-2011
Without +1
Today's date is;8-29-2011
Tomorrow's date will be: 8-30-2011
2 answers
Last reply by: alina trandafir
Sat May 23, 2015 7:31 PM
Post by Alvaro Lacerda on September 7, 2011
On the 10th line of the calendar program, why do you add "+1" after the "(Calendar.MONTH)"? why that doesn't happen to the other lines "(Calendar.DATE)" and "(Calendar.YEAR)" ?
Thanks,