• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:39
CET 22:39
KST 06:39
  • 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 Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3
StarCraft 2
General
RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced
Tourneys
RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle 2025 RSL Offline Finals Dates + Ticket Sales! Sparkling Tuna Cup - Weekly Open Tournament StarCraft2.fi 15th Anniversary Cup
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
How Rain Became ProGamer in Just 3 Months BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest BW General Discussion FlaSh on: Biggest Problem With SnOw's Playstyle
Tourneys
[ASL20] Grand Finals [BSL21] RO8 - Day 2 - Sunday 21:00 CET [BSL21] RO8 - Day 1 - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Fighting Spirit mining rates Current Meta
Other Games
General Games
Dawn of War IV Path of Exile Stormgate/Frost Giant Megathread Awesome Games Done Quick 2026! Nintendo Switch Thread
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 Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1487 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
The PiG Daily
21:30
Best Games of SC
Maru vs Reynor
TBD vs MaxPax
Maru vs SHIN
MaxPax vs Maru
LiquipediaDiscussion
BSL 21
20:00
RO8 - Day 2
Tech vs Cross
Bonyth vs eOnzErG
ZZZero.O390
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 535
IndyStarCraft 181
JuggernautJason107
UpATreeSC 61
PiGStarcraft44
StarCraft: Brood War
Britney 15240
Calm 2387
Shuttle 481
ZZZero.O 390
Mini 340
EffOrt 176
Dewaltoss 118
ggaemo 65
Dota 2
Gorgc5995
420jenkins265
LuMiX1
Heroes of the Storm
Khaldor521
Liquid`Hasu446
Other Games
Grubby3022
B2W.Neo729
hungrybox173
ArmadaUGS130
Fuzer 101
OptimusSC21
Organizations
Other Games
gamesdonequick1640
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Adnapsc2 13
• Dystopia_ 1
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV628
Other Games
• imaqtpie2607
• Shiphtur604
Upcoming Events
Replay Cast
11h 21m
Wardi Open
14h 21m
Monday Night Weeklies
19h 21m
Sparkling Tuna Cup
1d 12h
OSC
2 days
YoungYakov vs Mixu
ForJumy vs TBD
Percival vs TBD
Shameless vs TBD
Replay Cast
3 days
The PondCast
3 days
OSC
4 days
CranKy Ducklings
5 days
SC Evo League
5 days
[ Show More ]
BSL 21
5 days
Sparkling Tuna Cup
6 days
BSL 21
6 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Revival: Season 3
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
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

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
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.