• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 02:38
CET 08:38
KST 16:38
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
ByuL: The Forgotten Master of ZvT28Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0258LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2
StarCraft 2
General
Terran AddOns placement How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker ByuL: The Forgotten Master of ZvT Oliveira Would Have Returned If EWC Continued
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament SEL Doubles (SC Evo Bimonthly) WardiTV Team League Season 10 RSL Season 4 announced for March-April
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 515 Together Forever Mutation # 514 Ulnar New Year Mutation # 513 Attrition Warfare
Brood War
General
Soma Explains: JD's Unrelenting Aggro vs FlaSh Recent recommended BW games TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ ACS replaced by "ASL Season Open" - Starts 21/02
Tourneys
BWCL Season 64 Announcement The Casual Games of the Week Thread [Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1
Strategy
Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Battle Aces/David Kim RTS Megathread Nintendo Switch Thread Online Quake Live Config Editor Tool Diablo 2 thread Path of Exile
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread NASA and the Private Sector Things Aren’t Peaceful in Palestine UK Politics Mega-thread YouTube Thread
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Just Watchers: Why Some Only…
TrAiDoS
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2492 users

procrastinating

Blogs > RtS)Night[Mare
Post a Reply
Night[Mare
Profile Blog Joined December 2004
Mexico4793 Posts
Last Edited: 2008-02-21 04:21:25
February 20 2008 04:35 GMT
#1
i have to deliver my first java exam in 14 hours, and i havent started yet. I find the problems rather easy
+ Show Spoiler +

Problems
1. Write a program that will evaluate simple expressions such as 17 + 3 and 3.14159 * 4.7. The expressions are to be typed in by the user. The input always consist of a number, followed by an operator, followed by another number. The operators that are allowed are +, -, *, and /. Your program should read an expression, print its value, read another expression, print its value, and so on. The program should end when the user enters 0 as the first number on the line.

2. Write a program that reads one line of input text and breaks it up into words. The words should be output one per line. A word is defined to be a sequence of letters. Also, to "capitalize" a string means to change the first letter of each word in the string to upper case (if it is not already upper case). For example, a capitalized version of "Now is the time to act!" is "Now Is The Time To Act!".For example, if the user inputs the line
He said, "That's not a good idea."
then the output of the program should be
He
Said
That’s
Not
A
Good
Idea
An improved version of the program would list "that's" as a single word. An apostrophe can be considered to be part of a word if there is a letter on each side of the apostrophe.
To test whether a character is a letter, you might use (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'). However, this only works in English and similar languages. A better choice is to call the standard function Character.isLetter(ch), which returns a boolean value of true if ch is a letter and false if it is not. This works for any Unicode character.

Note that a letter is the first letter of a word if it is not immediately preceded in the string by another letter. Recall that there is a standard boolean-valued function Character.isLetter(char) that can be used to test whether its parameter is a letter. There is another standard char-valued function, Character.toUpperCase(char), that returns a capitalized version of the single character passed to it as a parameter. That is, if the parameter is a letter, it returns the upper-case version. If the parameter is not a letter, it just returns a copy of the parameter.

3. Suppose you choose people at random and check their birthdays. How many people will you check before you find one who has the same birthday as someone you've already checked? The days of the year are numbered from 0 to 364.


but the problem is that i know next to nothing in java syntax. I would easily do them in C++ >.<, if anyone here knows java feel free to help me out

zombie story part 5 due to thursday i think, i need to study for computer organization( much like logic circuits)

[image loading]


**
Teamliquidian townie
fight_or_flight
Profile Blog Joined June 2007
United States3988 Posts
February 20 2008 05:40 GMT
#2
I don't know what to say other than look at a lot of example problems and their java solutions...maybe that will help you learn the syntax.
Do you really want chat rooms?
Night[Mare
Profile Blog Joined December 2004
Mexico4793 Posts
February 20 2008 19:48 GMT
#3
ah, good enough for me, i finished my examn just in time, and all the programs were fine and running
Teamliquidian townie
ATeddyBear
Profile Blog Joined December 2005
Canada2843 Posts
February 20 2008 22:40 GMT
#4
dude wtf no girl
Professional twice over - an analyst and a therapist. The world’s first analrapist.
Steelflight-Rx
Profile Blog Joined July 2007
United States1389 Posts
Last Edited: 2008-02-20 22:54:33
February 20 2008 22:51 GMT
#5
You would use a scanner class to do the 2nd one, altho i have never used it myself, it is able to read and output data from a designated source file. (maybe you already knew that, idk, but if not that should give u a step in the right direction).

As for syntax, i dont know any C++ so i wouldn't be able to tell u how they are different/the same/whatever

edit: No zombie update! =O, i have been waiting for the next part since last night -.-
yubee wrote: you know? it's a great night you should all smile no matter what harddships, because grass grows and the sky is blue and it's a good life.
Scorpion
Profile Blog Joined April 2006
United States1974 Posts
February 20 2008 23:52 GMT
#6
Procrastinators unite!

Tomorrow...
Mango @ U.S.East!
Night[Mare
Profile Blog Joined December 2004
Mexico4793 Posts
February 21 2008 04:22 GMT
#7
imma lose my reputation if i dont keep posting girls at the end of my blogs.

Zombie update for friday people!
Teamliquidian townie
Please log in or register to reply.
Live Events Refresh
Next event in 1h 22m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft521
Lowko231
NeuroSwarm 115
SortOf 88
StarCraft: Brood War
Sea 36457
GuemChi 3061
actioN 656
Mong 501
PianO 483
Leta 167
ToSsGirL 76
Stork 67
Dewaltoss 52
NaDa 35
[ Show more ]
Jaeyun 18
Backho 17
League of Legends
JimRising 625
Counter-Strike
Stewie2K864
m0e_tv512
Other Games
summit1g10017
C9.Mang0325
Happy183
ceh9147
Livibee69
Mew2King44
crisheroes21
Organizations
Other Games
gamesdonequick713
Counter-Strike
PGL250
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• davetesta35
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1754
Upcoming Events
Replay Cast
1h 22m
Wardi Open
4h 22m
Monday Night Weeklies
9h 22m
Replay Cast
16h 22m
Replay Cast
2 days
Replay Cast
2 days
The PondCast
3 days
KCM Race Survival
3 days
Replay Cast
3 days
Ultimate Battle
4 days
Light vs ZerO
[ Show More ]
Replay Cast
4 days
CranKy Ducklings
5 days
Replay Cast
5 days
Sparkling Tuna Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS5
PiG Sty Festival 7.0
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
Nations Cup 2026
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025

Upcoming

ASL Season 21: Qualifier #1
ASL Season 21: Qualifier #2
ASL Season 21
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
NationLESS Cup
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.