Summer in Happy Valley brings out the best local artists and entertainment from around Pennsylvania. Though we still have a few weeks until Arts Fest, you can still visit State College to hear some of the area?s most talented artists and musicians. This Saturday, June 22nd kicks off Summer?s Best Music Fest 2013, the annual day long arts and music festival held in downtown State College.
The festival will feature a full day of music on three stages throughout downtown State College, as well as additional activities for the whole family. The annual downtown street bazaar will host artists selling their crafts along Allen Street and Calder Way, the Centre County PAWS will host a live event at Humes Alley on Calder featuring dogs who need a good home, and the downtown artist marketplace Uncle Eli?s will sponsor the Plein Air Painting competition.
Check out the full music schedule for each stage below:
Allen Street Stage 12:30 ? Keystone Society of Swing (Big Band) 2:00 ? ? Callanish (Celtic) 3:30 ? ??Triple A Blues Band (Blues) 5:00 ? ??Chicken Tractor (Americana Folk) 6:30 ? ? Erin Condo & the Hoofties (Contemporary Country/Folk) 8:00 ? ??Pure Cane Sugar (Downhome Rock)
Calder Way Stage 12:00 ? Hot Mamas (Contemporary) 1:30 ? ? Tussey Mountain Moonshiners (Bluegrass) 3:00 ? ??Jay Vonada Jazz Trio (Jazz) 4:30 ? ? Biscuit Jam (Contemporary Folk)
Hiester Street ?Rock the Block? Stage 12:30 ? Sonic Schroeder (Retro Rock/Variety) 2:00 ? ? Percolators (Reggae) 3:30 ? ? Spider Kelly (Rock) 5:00 ? ? Ted & The HiFis (Variety Rock) 7:00 ? ? Atlas Soundtrack (Hip Hop/Funk)
BERLIN (AP) ? Five years and 50 years. As President Barack Obama revisits Berlin, he can't escape those anniversaries and the inevitable comparisons to history and personal achievement.
His 26-hour whirlwind visit to the German capital caps three days of international summitry for the president and marks his return to a place where he once summoned a throng of 200,000 to share his ambitious vision for American leadership.
That was 2008, when Obama was running for president and those who supported him at home and abroad saw the young mixed-race American as a unifying and transformational figure who signified hope and change.
Five years later, Obama comes to deliver a highly anticipated speech to a country that's a bit more sober about his aspirations and the extent of his successes, yet still eager to receive his attention at a time that many here feel that Europe, and Germany in particular, are no longer U.S. priorities. A Pew Research Center poll of Germans found that while their views of the U.S. have slipped since Obama's first year in office, he has managed to retain his popularity, with 88 percent of those surveyed approving of his foreign policies.
Obama also has an arc of history to fulfill.
Fifty years ago next week, President John F. Kennedy addressed a crowd of 450,000 in that then-divided city to denounce the Soviet bloc and famously declare "Ich bin ein Berliner," German for "I am a Berliner." Since then, presidents from Ronald Reagan to Bill Clinton have used Berlin speeches to articulate broad themes about freedom and international alliances.
Obama, fresh from a two-day summit of the Group of Eight industrial economies, will speak at the Brandenburg Gate, a symbol of Germany's division and later reunification. It is a venue that German Chancellor Angela Merkel denied him in 2008, saying only sitting presidents were granted such an honor.
The past context ? and the weight of it ? are not lost on the White House.
"This is a place where U.S. presidents have gone to talk about the role of the free world essentially," said Obama's deputy national security adviser, Ben Rhodes. "He is seeking to summon the energy and legacy of what's been done in the past and apply it to the issues that we face today."
Rhodes said Obama will make the case that even though the Berlin Wall came down 23 years ago and the threat of nuclear war has dissipated, the type of activism apparent during the Cold War needs to be applied to such current challenges as climate change, counterterrorism and the push for democratic values beyond the United States and Europe.
A senior administration official said Obama will also renew his call to reduce the world's nuclear stockpiles, including a proposed one-third reduction in U.S. and Russian arsenals. He is not expected to outline a timeline for this renewed push. The official insisted on anonymity in order to preview the issue before the president's speech.
Obama will also hold a joint news conference with Merkel.
The visit was attracting widespread attention in Germany. People waved and snapped photos as Obama sped by after his arrival and a thick cluster awaited the motorcade as it passed the Brandenburg Gate. An evening news show in Berlin devoted itself to the president's visit, highlighting "Das Biest," or "The Beast," as the president's armored limousine is called.
There have been a few small protests, including one directed against the National Security Agency's surveillance of foreign communications, where about 50 people waved placards taunting, "Yes, we scan."
Merkel has said she was surprised at the scope of the spying that was revealed and said the U.S. must clarify what information is monitored. But she also said U.S. intelligence was key to foiling a large-scale terror plot and acknowledged her country is "dependent" on cooperating with American spy services.
For Merkel, the visit presents an opportunity to bolster her domestic standing ahead of a general election in September.
The U.S. and the Germans have clashed on economic issues, with Obama pressing for Europe to prime the economy with government stimulus measures, while Merkel has insisted on pressing debt-ridden countries to stabilize their fiscal situations first.
But the two sides have found common ground on a trans-Atlantic trade pact between the European Union and the U.S. At the just-completed G-8 summit, the leaders agreed to hold the first talks next month in the U.S.
___
Associated Press writers Julie Pace, Robert Reid and Frank Jordans in Berlin contributed to this report.
When terrorists strike, intelligence agencies are faulted for failure to 'connect the dots.' If that's what the NSA is trying to do with its mass surveillance of phone records and Internet use, how do Americans feel about that?
By Brad Knickerbocker,?Staff writer / June 9, 2013
President Barack Obama gestures at a press conference Friday in San Jose, Calif. Speaking about the NSA collecting phone records, the president said "Nobody is listening to your telephone calls," just numbers and duration.
Evan Vucci/AP
Enlarge
Every time foreign-influenced attackers successfully strike the United States ? the mass shooting at Ft. Hood, the Boston Marathon bombing ? government agencies are faulted for failure to ?connect the dots.?
Click Here for your FREE 30 DAYS of The Christian Science Monitor Weekly Digital Edition
Why weren?t US Army Maj. Nidal Hasan?s e-mail contacts with radical cleric Anwar al-Awlaki (the American-born imam later killed in a US drone attack in Yemen) seen as reason enough to possibly head off Hasan?s killing 13 people at the Army post in Texas?
Why weren?t the Tsarnaev brothers? possible links to radical Islam ? including older brother Tamerlan Tsarnaev?s six-month trip to?Russia, where he spent considerable time in the Islamic republics of Chechnya?and?Dagestan ? enough to tip off the FBI to investigate further? Shortly after that trip, Tamerlan began posting YouTube videos exhorting jihad.
Connecting the dots is exactly what the National Security Agency says it?s trying to do with the now-revealed programs vacuuming up billions of bits of ?mega-data? on telephone calls and Internet use.
How do Americans feel about this?
With the latest revelations just days ? in some cases, hours ? old, it?s too soon to know for sure.
But since the terrorist attacks of 9/11, the public has been generally supportive of national security efforts ? sometimes finding those more important than any concern about privacy and other things dear to civil liberties advocates.
?Voters give government leeway to snoop? reads the headline on James Hohmann?s piece on Politico.com.
?Privacy is sort of like the deficit: In the abstract, voters rate it a serious concern,? Mr. Hohmann writes. ?But drill down, and they don?t want to cut the entitlements that balloon federal spending ? or end programs that have prevented terrorist attacks. Especially if Americans don?t believe their own computers and phones are being monitored, they are willing to give the government a long leash.?
Contact: Lynn Yarris lcyarris@lbl.gov 510-486-5375 DOE/Lawrence Berkeley National Laboratory
Berkeley Lab researchers develop fully integrated microfluidic test-bed for solar-driven electrochemical energy conversion systems
With the daily mean concentrations of atmospheric carbon dioxide having reached 400 parts-per-million for the first time in human history, the need for carbon-neutral alternatives to fossil fuel energy has never been more compelling. With enough energy in one hour's worth of global sunlight to meet all human needs for a year, solar technologies are an ideal solution. However, a major challenge is to develop efficient ways to convert solar energy into electrochemical energy on a massive-scale. A key to meeting this challenge may lie in the ability to test such energy conversion schemes on the micro-scale.
Berkeley Lab researchers, working at the Joint Center for Artificial Photosynthesis (JCAP), have developed the first fully integrated microfluidic test-bed for evaluating and optimizing solar-driven electrochemical energy conversion systems. This test-bed system has already been used to study schemes for photovoltaic electrolysis of water, and can be readily adapted to study proposed artificial photosynthesis and fuel cell technologies.
"We've demonstrated a microfluidic electrolyzer for water splitting in which all functional components can be easily exchanged and tailored for optimization," says Joel Ager, a staff scientist with Berkeley Lab's Materials Sciences Division. "This allows us to test on a small scale strategies that can be applied to large scale systems."
Ager is one of two corresponding authors of a paper in the journal Physical Chemistry Chemical Physics (PCCP) titled "Integrated microfluidic test-bed for energy conversion devices." Rachel Segalman, also with Berkeley Lab's Materials Sciences Division is the other corresponding author. Other co-authors are Miguel Modestino, Camilo Diaz-Botia, Sophia Haussener and Rafael Gomez-Sjoberg.
For more than two billion years, nature has employed photosynthesis to oxidize water into molecular oxygen. An artificial version of photosynthesis is regarded as one of the most promising of solar technologies. JCAP is a multi-institutional partnership led by the California Institute of Technology (Caltech) and Berkeley Lab with operations in Berkeley (JCAP-North) and Pasadena (JCAP-South). The JCAP mission is to develop an artificial version of photosynthesis through specialized membranes made from nano-engineered materials that can do what nature does only much more efficiently and for the purpose of producing storable fuels such as hydrogen or hydrocarbons (gasoline, diesel, etc.).
"The operating principles of artificial photosynthetic systems are similar to redox flow batteries and fuel cells in that charge-carriers need to be transported to electrodes, reactants need to be fed to catalytic centers, products need to be extracted, and ionic transport both from the electrolyte to catalytic centers and across channels needs to occur," Ager says. "While there have been a number of artificial photosynthesis demonstrations that have achieved attractive solar to hydrogen conversion efficiencies, relatively few have included all of the operating principles, especially the chemical isolation of the cathode and anode."
The microfluidic test-bed developed by Ager and his colleagues at JCAP-N allows for different anode and cathode materials to be integrated and electrically accessed independently through macroscopic contacts patterned in the outside of the microfabricated chip. The transport of charge-carriers occurs through an ion conducting polymer membrane, and electrolysis products can be evolved and collected in separated streams. This general design provides selective catalysis at the cathode and anode, minimization of cross-over losses, and managed transport of the reactants. Virtually any photoelectrochemical component, including those made of earth-abundant elements, can be incorporated into the test-bed.
Says Modestino, the lead author of the PCCP paper, "In our experimental realization of the design, a series of 19
parallel channels were fabricated in each device, with a total active area of eight square millimeters. As the microfabricated chips are relatively easy to make, we can readily change
dimensions and materials to optimize performance."
###
This research was supported by the DOE Office of Science.
Lawrence Berkeley National Laboratory addresses the world's most urgent scientific challenges by advancing sustainable energy, protecting human health, creating new materials, and revealing the origin and fate of the universe. Founded in 1931, Berkeley Lab's scientific expertise has been recognized with 13 Nobel prizes. The University of California manages Berkeley Lab for the U.S. Department of Energy's Office of Science. For more, visit http://www.lbl.gov.
DOE's Office of Science is the single largest supporter of basic research in the physical sciences in the United States, and is working to address some of the most pressing challenges of our time. For more information, please visit the Office of Science website at science.energy.gov/.
[ | E-mail | Share ]
?
AAAS and EurekAlert! are not responsible for the accuracy of news releases posted to EurekAlert! by contributing institutions or for the use of any information through the EurekAlert! system.
Contact: Lynn Yarris lcyarris@lbl.gov 510-486-5375 DOE/Lawrence Berkeley National Laboratory
Berkeley Lab researchers develop fully integrated microfluidic test-bed for solar-driven electrochemical energy conversion systems
With the daily mean concentrations of atmospheric carbon dioxide having reached 400 parts-per-million for the first time in human history, the need for carbon-neutral alternatives to fossil fuel energy has never been more compelling. With enough energy in one hour's worth of global sunlight to meet all human needs for a year, solar technologies are an ideal solution. However, a major challenge is to develop efficient ways to convert solar energy into electrochemical energy on a massive-scale. A key to meeting this challenge may lie in the ability to test such energy conversion schemes on the micro-scale.
Berkeley Lab researchers, working at the Joint Center for Artificial Photosynthesis (JCAP), have developed the first fully integrated microfluidic test-bed for evaluating and optimizing solar-driven electrochemical energy conversion systems. This test-bed system has already been used to study schemes for photovoltaic electrolysis of water, and can be readily adapted to study proposed artificial photosynthesis and fuel cell technologies.
"We've demonstrated a microfluidic electrolyzer for water splitting in which all functional components can be easily exchanged and tailored for optimization," says Joel Ager, a staff scientist with Berkeley Lab's Materials Sciences Division. "This allows us to test on a small scale strategies that can be applied to large scale systems."
Ager is one of two corresponding authors of a paper in the journal Physical Chemistry Chemical Physics (PCCP) titled "Integrated microfluidic test-bed for energy conversion devices." Rachel Segalman, also with Berkeley Lab's Materials Sciences Division is the other corresponding author. Other co-authors are Miguel Modestino, Camilo Diaz-Botia, Sophia Haussener and Rafael Gomez-Sjoberg.
For more than two billion years, nature has employed photosynthesis to oxidize water into molecular oxygen. An artificial version of photosynthesis is regarded as one of the most promising of solar technologies. JCAP is a multi-institutional partnership led by the California Institute of Technology (Caltech) and Berkeley Lab with operations in Berkeley (JCAP-North) and Pasadena (JCAP-South). The JCAP mission is to develop an artificial version of photosynthesis through specialized membranes made from nano-engineered materials that can do what nature does only much more efficiently and for the purpose of producing storable fuels such as hydrogen or hydrocarbons (gasoline, diesel, etc.).
"The operating principles of artificial photosynthetic systems are similar to redox flow batteries and fuel cells in that charge-carriers need to be transported to electrodes, reactants need to be fed to catalytic centers, products need to be extracted, and ionic transport both from the electrolyte to catalytic centers and across channels needs to occur," Ager says. "While there have been a number of artificial photosynthesis demonstrations that have achieved attractive solar to hydrogen conversion efficiencies, relatively few have included all of the operating principles, especially the chemical isolation of the cathode and anode."
The microfluidic test-bed developed by Ager and his colleagues at JCAP-N allows for different anode and cathode materials to be integrated and electrically accessed independently through macroscopic contacts patterned in the outside of the microfabricated chip. The transport of charge-carriers occurs through an ion conducting polymer membrane, and electrolysis products can be evolved and collected in separated streams. This general design provides selective catalysis at the cathode and anode, minimization of cross-over losses, and managed transport of the reactants. Virtually any photoelectrochemical component, including those made of earth-abundant elements, can be incorporated into the test-bed.
Says Modestino, the lead author of the PCCP paper, "In our experimental realization of the design, a series of 19
parallel channels were fabricated in each device, with a total active area of eight square millimeters. As the microfabricated chips are relatively easy to make, we can readily change
dimensions and materials to optimize performance."
###
This research was supported by the DOE Office of Science.
Lawrence Berkeley National Laboratory addresses the world's most urgent scientific challenges by advancing sustainable energy, protecting human health, creating new materials, and revealing the origin and fate of the universe. Founded in 1931, Berkeley Lab's scientific expertise has been recognized with 13 Nobel prizes. The University of California manages Berkeley Lab for the U.S. Department of Energy's Office of Science. For more, visit http://www.lbl.gov.
DOE's Office of Science is the single largest supporter of basic research in the physical sciences in the United States, and is working to address some of the most pressing challenges of our time. For more information, please visit the Office of Science website at science.energy.gov/.
[ | E-mail | Share ]
?
AAAS and EurekAlert! are not responsible for the accuracy of news releases posted to EurekAlert! by contributing institutions or for the use of any information through the EurekAlert! system.
Samsung just held a small preview event in Helsinki, Finland, where we briefly had the chance to play with some of its latest devices. The Intel-powered Galaxy Tab 3 10.1 was there, along with the smaller Galaxy Tab 3 8.0. We also grabbed a few moments with the Galaxy S 4 mini as well as the Galaxy S 4 Active, both of which seemed kinda predictable but nevertheless managed to leave a good impression. There was no sign of the new Galaxy Ace 3 or the heavily rumored Galaxy S 4 Zoom, and we weren't able to grab video of any of the products, but we do have a gallery for you below and some very early impressions if you read on.
"); ipb.editor_values.get('templates')['togglesource'] = new Template(""); ipb.editor_values.get('templates')['toolbar'] = new Template(""); ipb.editor_values.get('templates')['button'] = new Template("
"); ipb.editor_values.get('templates')['menu_item'] = new Template("
#{title}
"); ipb.editor_values.get('templates')['togglesource'] = new Template(""); ipb.editor_values.get('templates')['emoticons_showall'] = new Template(""); ipb.editor_values.get('templates')['emoticon_wrapper'] = new Template("
Emoticons
"); // Add smilies into the mix ipb.editor_values.set( 'show_emoticon_link', false ); ipb.editor_values.set( 'bbcodes', $H({"snapback":{"id":"1","title":"Post Snap Back","desc":"This tag displays a little linked image which links back to a post - used when quoting posts from the board. Opens in same window by default.","tag":"snapback","useoption":"0","example":"[snapback]100[/snapback]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"topic":{"id":"5","title":"Topic Link","desc":"This tag provides an easy way to link to a topic","tag":"topic","useoption":"1","example":"[topic=1]Click me![/topic]","switch_option":"0","menu_option_text":"Enter the topic ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"post":{"id":"6","title":"Post Link","desc":"This tag provides an easy way to link to a post.","tag":"post","useoption":"1","example":"[post=1]Click me![/post]","switch_option":"0","menu_option_text":"Enter the Post ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"spoiler":{"id":"7","title":"Spoiler","desc":"Spoiler tag","tag":"spoiler","useoption":"0","example":"[spoiler]Some hidden text[/spoiler]","switch_option":"0","menu_option_text":"","menu_content_text":"Enter the text to be masked","single_tag":"0","optional_option":"0","image":""},"acronym":{"id":"8","title":"Acronym","desc":"Allows you to make an acronym that will display a description when moused over","tag":"acronym","useoption":"1","example":"[acronym='Laugh Out Loud']lol[/acronym]","switch_option":"0","menu_option_text":"Enter the description for this acronym (EG: Laugh Out Loud)","menu_content_text":"Enter the acronym (EG: lol)","single_tag":"0","optional_option":"0","image":""},"hr":{"id":"12","title":"Horizontal Rule","desc":"Adds a horizontal rule to separate text","tag":"hr","useoption":"0","example":"[hr]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"1","optional_option":"0","image":""},"php":{"id":"14","title":"PHP Code","desc":"Allows you to enter PHP code into a formatted/highlighted syntax box","tag":"php","useoption":"0","example":"[php]$variable = true;\n\nprint_r($variable);[/php]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"html":{"id":"15","title":"HTML Code","desc":"Allows you to enter formatted/syntax-highlighted HTML code","tag":"html","useoption":"0","example":"[html]\n \n[/html]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"sql":{"id":"16","title":"SQL Code","desc":"Allows you to enter formatted/syntax-highlighted SQL code","tag":"sql","useoption":"0","example":"[sql]SELECT p.*, t.* FROM posts p LEFT JOIN topics t ON t.tid=p.topic_id WHERE t.tid=7[/sql]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"xml":{"id":"17","title":"XML Code","desc":"Allows you to enter formatted/syntax-highlighted XML code","tag":"xml","useoption":"0","example":"[xml]\n \n Test\n \n[/xml]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"member":{"id":"31","title":"Member","desc":"Given a member name, a link is automatically generated to the member's profile","tag":"member","useoption":"1","example":"[member=skyhawk133] runs this site.","switch_option":"0","menu_option_text":"Input Username of Member","menu_content_text":"","single_tag":"1","optional_option":"0","image":"memberbbcode.png"},"extract":{"id":"33","title":"Extract Blog Entry","desc":"This will allow users to define an extract for an entry. Only this piece of the entry will be displayed on the main blog page and will show up in the RSS feed.","tag":"extract","useoption":"0","example":"[extract]This is an example![/extract]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"blog":{"id":"34","title":"Blog Link","desc":"This tag provides an easy way to link to a blog.","tag":"blog","useoption":"1","example":"[blog=100]Click me![/blog]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"entry":{"id":"35","title":"Blog Entry Link","desc":"This tag provides an easy way to link to a blog entry.","tag":"entry","useoption":"1","example":"[entry=100]Click me![/entry]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"twitter":{"id":"36","title":"Twitter","desc":"A tag to link to a user's twitter account","tag":"twitter","useoption":"0","example":"[twitter]userName[/twitter]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":"twitter.png"},"inline":{"id":"37","title":"Inline Code","desc":"Formats code inline instead of in a seperate code box. ","tag":"inline","useoption":"0","example":"[inline]style=\"font-size: 12px;\"[/inline]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"il":{"id":"38","title":"Abbreviated Inline (IL)","desc":"Abbreviated version of the [inline] tag. ","tag":"il","useoption":"0","example":"[il]Code Here[/il]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":"il2.png"},"code":{"id":"41","title":"Code","desc":"Allows you to enter general code","tag":"code","useoption":"1","example":"[code]$text = 'Some long code here';[/code]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"1","image":""}}) ); ipb.vars['emoticon_url'] = "http://cdn.dreamincode.net/forums/public/style_emoticons/default"; //Search Setup ipb.vars['search_type'] = 'forum'; ipb.vars['search_type_id'] = 32; ipb.vars['search_type_2'] = 'topic'; ipb.vars['search_type_id_2'] = 322725; //]]>
I am having some issues completing an assignment for my programming class. This deals with phone number dissection. I have most of the work done but I cannot seem to make the breakthrough on what is wrong with my code. I keep getting the same error: ".class" expected and ";" expected.
I have consulted with my prof and he gave me a hint on what is wrong however, I have no clue what is is talking about. Can anyone decipher? Here's what he said, "You need to break the number apart inside the constructor."
Below is my program:
/*************************************************************************************** * JCDissector.java * JR Camana * * This program dissects a phone number into its individual pieces. ****************************************************************************************/
public class JCDissector { String colonSeparated; //string holding the entire phone number separated by colons String countryCode; //country code of a phone number int areaCode; //area code of a phone number int prefix; //prefix numbers in a phone number int number; //last four digits of a phone number
public JCDissector(String colonSeparated) { this.colonSeparated = colonSeparated; } //end constructor
public String getPhoneNumber(int i) { return this.colonSeparated; } //end getPhoneNumber
public String getPhoneNumber(1) { countryCode = colonSeparated.subString(0,colonSeparated.indexOf(':')); }
public String getPhoneNumber(4) { String tempNumber = colonSeparated.subString(colonSeparated.lastIndexOf(':')); number = Integer.parseInt(tempNumber); }
}//end JCDissector
/*************************************************************************************** * JRCamanaProg1.java * JR Camana * * This program is the Phone class for the driver JRCamanaProg1.java file. ****************************************************************************************/
public class JRCamanaProg1 { public static void main(String[] args) { JCDissector phone = new JCDissector("1:919:882:5000"); System.out.println(phone.getPhoneNumber(int i)); System.out.println(phone.getPhoneNumber(4)); System.out.println(phone.getPhoneNumber(1)); System.out.println(phone.getPhoneNumber(3)); System.out.println(phone.getPhoneNumber(2)); } }// end main
Is This A Good Question/Topic? 0
Replies To: Java Phone Number Dissection Error
#2 Hqtitan ?
Reputation: 4
Posts:31
Joined:28-August 10
Re: Java Phone Number Dissection Error
Posted Yesterday, 05:45 PM
Rather than trying to pull the section in the method to get that section, you should do the dissection and set your phone number section variables when the object is constructed. I don't think that this has much to do with the errors you are receiving, but it could prevent errors further down the line.
With the way you have this set up now, the instance variables countryCode, areaCode[/li], prefix, and [il]number remain undefined until the corresponding method is called. You can't/shouldn't control what order the methods will be called, because a different user might not know exactly how this has been set up, and won't use it the same way that you are. You're also running the dissection every single time the method is called. Rather than run it every time, run it once in the constructor and store the values in the variables.
You will also get problems with not returning anything in your methods, since you have specified that they should return a String.