Systems Programming CS 476
Popular in Course
Popular in ComputerScienence
This 4 page Class Notes was uploaded by Armani Kunde on Monday September 28, 2015. The Class Notes belongs to CS 476 at Old Dominion University taught by Staff in Fall. Since its upload, it has received 29 views. For similar materials see /class/215314/cs-476-old-dominion-university in ComputerScienence at Old Dominion University.
Reviews for Systems Programming
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/28/15
Java Basics Part I Evegxthing is an Object public class HelloDate public static void mainString args System0utprintlnquotHello it39s quot System 0utprintlnnew Date H ow to Complie it make OR javac HelloDatejava How to Run it java HelloDate Controlling Program Flow Operators precedence assignment If else While Do While For Switch gt gt gt gt gt gt IS Mf dQ 739squot public class VowelsAndConsonants public static void mainString args int i 0 i lt 100 i char c charMathrand0m 26 a System0utprintc quot quot c System 0utprint1nquotV0welquot break case 39y case w System 0utprint1n quotSometimes a vowelquot break default System outprintlnquotc0ns0nantquot Initilization amp Cleanun 39 ArrayNew public class ArrayNew static Random rand new Random public static void mainString args int a a new intrandneXtInt20 S stem outprintlnquotlength of a quot a length inti 0 i lt alength i Systemoutprintlnquota i quot quot ai static boolean gcrun false static boolean f false static int created 0 static int nalized 0 int i39 ll 1 created if i 1000 0 System0utprintln quotChair quot i quot is creatednquot public void m inquot a gcrun The rst time nalize is called gcrun true System0utprintln quotBeginning to nalize after quot created quot Chairs have been createdquot f true nalized new Chair System outprintln quotAfter loopn quottotal created quot Chaircreated quot total nalized quot Chair nalized Run as applet The Java 10 System IOStreamDemojava public class IOStreamDemo public static void mainString args throws IOException Finding le length File le new File long length lelength Systemoutprintlnquot le lenght is quot length a Transfer bytes from in to out String in le String out le 39 InputStream n new FileInputStreamin le OutputStream fout new FileOutputStream0ut le byte buf new byte1024 int len while len nreadbuf gt 0 f0utwritebuf 0 len nclose foutclose Reading standard input SystemoutprintquotEnter a linequot
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'