• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 00:05
CET 06:05
KST 14:05
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win1BGE Stara Zagora 2026 announced14[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband BGE Stara Zagora 2026 announced Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ FlaSh's Valkyrie Copium BW General Discussion A cwal.gg Extension - Easily keep track of anyone Which season is the best in ASL?
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Should offensive tower rushing be viable in RTS games? Path of Exile Nintendo Switch Thread The Perfect Game Stormgate/Frost Giant Megathread
Dota 2
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread The Big Programming Thread Things Aren’t Peaceful in Palestine Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1257 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 3h 55m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 145
StarCraft: Brood War
Calm 4073
Larva 1621
Leta 171
ZergMaN 127
Noble 36
Bale 24
JulyZerg 10
Icarus 9
SilentControl 6
Dota 2
monkeys_forever538
NeuroSwarm115
League of Legends
JimRising 744
Cuddl3bear4
Other Games
summit1g20604
Mew2King112
ViBE73
Organizations
Other Games
gamesdonequick1562
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• practicex 40
• Kozan
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
StarCraft: Brood War
• RayReign 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21855
League of Legends
• Doublelift4554
• Rush1645
• Lourlo856
• Berry_CruncH199
Other Games
• Scarra1593
Upcoming Events
Replay Cast
3h 55m
Wardi Open
6h 55m
Monday Night Weeklies
11h 55m
StarCraft2.fi
11h 55m
Replay Cast
18h 55m
Wardi Open
1d 6h
StarCraft2.fi
1d 11h
PiGosaur Monday
1d 19h
Wardi Open
2 days
StarCraft2.fi
2 days
[ Show More ]
Replay Cast
2 days
The PondCast
3 days
Replay Cast
3 days
Korean StarCraft League
4 days
CranKy Ducklings
5 days
SC Evo League
5 days
BSL 21
5 days
Sziky vs OyAji
Gypsy vs eOnzErG
Sparkling Tuna Cup
6 days
BSL 21
6 days
Bonyth vs StRyKeR
Tarson vs Dandy
Liquipedia Results

Completed

Proleague 2025-11-28
RSL Revival: Season 3
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
Light HT
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
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 © 2025 TLnet. All Rights Reserved.