topbella

My Love in Programming

i don’t know if we have second chance s pagrereport but i would like to post some of my research…malay mu mk2long db???

*In creating a program, first u should have a problem & u should analyze it carefully.After analyzing the problem, den develop a solution 4 d prob.

*FUNCTION:
import java.io.*;
(import ► reserved word in Java, while
java.io ► is a package in Java that will accept input data.)

public class FILENAME
(public ► is an access modifier
class ► is used to call the name of the program)

public static void main (String args []) throws IOException
(public ► access modifier
static ► means unchanging & indicates dat evry member created 4d First class will have an identical, unchanging main() method
void ► means empty, it does not return any value when it is called
main() ► is needed in creating a progrm b’coz compiler always executes d main () method first.
String args[]►it represent character strings. d identifier ARGS is used to hold any string dat might b sent 2 d main() method.
throws IOException►is a package of java.io dat reads keyboard input.)

BufferedReader x=new BufferedReader(new InputStreamReader(System.in));
(BufferedReader►like throws, BufferedReader is also a package of java.io…lagi itong ksma wen u declare java.io.It also reads keyboard input
NOTE:Except x, BufferedReader up to last part of this statement are constant.

parse►is to convert no to string.
NOTE: only no is needed to convert(int, float & double)
ex:
a=Integer.parseInt (x.readLine());
b=Float.parseFloat (x.readLine());
c=Double.parseDouble (x.readLine());

for char
d=(x.readLine().charAt(0));

*NEED TO REMEMBER: in declaring variable it must have data type (float, double for floating no, int for whole no, String for sequence of character & char for character.)

*IN REPETITION STRUCTURE, we have for, do, & do-while; all of this looping must have initialization, condition & incrementation. DON’T FORGET THAT!
-for me, for condition is easier..how ab8 sau?

SYNTAX OF FOR:
for (a=1;a

SYNTAX OF DO-WHILE:
int a=1;
do{System.out.print(”");a++;}while(a

SYNTAX OF DO:
-alm mu n yan
a=1►is called initialization
a
a++►is called incrementation

System.out.print ► is to display the data

***I hope maka2long to sa inyo..hanggang d2 n lng kz pagod n q: if meon kau question, magresearch n lng kau..ahihihi…joke lng
ask nyo n lng sqn..bhl n kau mag-icp ng way qng ppnu nyo maittnong sqn ha…wahehehhe…

GUDLUCK S ATING LAHAT…
KITA-KITS SA FINALS

About Me

My photo
Philippines
w/ faith in Christ honest trustworthy friendly