Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
15
Posts with Downvotes
5
Downvoting Members
8
7 Commented Posts
0 Endorsements
Ranked #4K
~8K People Reached
About Me

Passion for java

Favorite Tags

16 Posted Topics

Member Avatar for Maureen

The best way of programming is to make your fields(member variables) always private and make your methods public to preserve encapsulation in java. The setter(mutators) and getter(accessors) methods are used to set and get the field values by other classes. you can directly use yourobject.hashCode() to find the hash code.

Member Avatar for manjushreekaran
0
3K
Member Avatar for ziaul1234

Well you could do this many ways....use html form as front end and connect to some database and perform all the functionalities...or use swings and use a text file as a persistent store...how r u supposed to do this?

Member Avatar for linx311
-2
459
Member Avatar for fardoonmuhafiz

hi, i deployed a webapplication(wapp1) having input.html and a servlet(Servlet1) in tomcat web server. The form input.html just accepts a text and when u click on the button click the request is sent to servlet in wapp1. The request is redirected to a servlet(Servlet2) which is in a webapplication(wapp2) deployed …

Member Avatar for fardoonmuhafiz
-1
85
Member Avatar for fardoonmuhafiz

Which is the most efficient way of creating a string object in java? [icode]String s="helo";[/icode] or [icode]String s=new String("helo");[/icode] in terms of memory usage? Thanks in advance...

Member Avatar for fardoonmuhafiz
0
93
Member Avatar for qutejose
Re: J2EE

[QUOTE=qutejose;1132219]Does J2EE support Enterprise applications? Is Java Beans an application dependent components? Does JavaBeans support sharing among the network? 1 Javabean can contain how many classes? Does Servlets execution starts with main methods?[/QUOTE] servlets doesnt start with main method....servlet has lifecycle methods which are executed by a web server or …

Member Avatar for fardoonmuhafiz
-1
91
Member Avatar for beanboy

Otherwise u do one thing....compile ur servlets .java files and place the .class files manually in the WEB-INF/classes folder then it shld work...and one more thing...did u make ur servlet public?....

Member Avatar for fardoonmuhafiz
0
92
Member Avatar for fardoonmuhafiz
Member Avatar for verruckt24
-3
147
Member Avatar for mayaaa

Well i am not sure if we can directly call a user-defined method of one servlet from another servlet....but we can achieve this in this way....I have defined an user defined method in servletB and called it in doGet() lifecycle method of SerletB and from the ServletA's life cycle method …

Member Avatar for mayaaa
0
3K
Member Avatar for jemz

Well...this is a code snippet to connect to oracle data base using type-1 driver using your java program:...hope this helps you...... import java.sql.*; class DbConnection { public static void main(String[] args) { try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:Fardoon","scott","tiger"); DatabaseMetaData dbmd=con.getMetaData(); String str=dbmd.getDatabaseProductName(); System.out.println("The name of the database you are using is: "+str); …

Member Avatar for jemz
0
125
Member Avatar for fardoonmuhafiz

If a class doesnt override toString() method and tries to print out the object like this: //some class [code] public class SomeClass1{ int x=4; } //another class class DemoOftoString { public static void main(String[] args) { SomeClass1 o=new SomeClass1(); System.out.println(o); } } [/code] output:SomeClass1@hex version of object's hash code ------------------------------------------ …

Member Avatar for fardoonmuhafiz
0
101
Member Avatar for chern4ever

/*this code shld work...5/9 returns 0 so use 5/9.0 which returns float value*/ import javax.swing.JOptionPane; public class Test{ public static void main(String args[]){ String numT = JOptionPane.showInputDialog(null,"Please enter a value."); double num1 = Double.parseDouble(numT); System.out.println("Fahrenheite = "+num1+"\nCelcius = "+convertFtoC( num1 )); } public static double convertFtoC ( double num1 ){ …

Member Avatar for fardoonmuhafiz
0
176
Member Avatar for fardoonmuhafiz
Member Avatar for joehms22
0
77
Member Avatar for fardoonmuhafiz

Hi, I have a doubt here, plz go thru the code snippet here: Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from emp"); Statement and ResultSet are interfaces. executeQuery() method of Statement interface returns a ResultSet object here. That means defnitely Statement should implement ResultSet interface methods to return a ResultSet object, but …

Member Avatar for javaAddict
0
84
Member Avatar for Dannyo329

GregorianCalendar(concrete class) is a subclass of Calendar(abstract class).So u can use either....So u can say GregorianCaendar c=new GregorianCalendar.......thanks

Member Avatar for Dannyo329
0
94
Member Avatar for anjalhere

import java.util.*; class ClassOne { public static void main(String[] args) { int eid; String ename; double salary; Scanner sin=new Scanner(System.in); System.out.println("Enter eid"); eid=sin.nextInt(); System.out.println("Enter ename"); ename=sin.next(); System.out.println("Enter salary"); salary=sin.nextDouble(); Employee e1=new Employee(); e1.accept(eid,ename,salary); e1.display(); System.out.println("Enter eid"); eid=sin.nextInt(); System.out.println("Enter ename"); ename=sin.next(); System.out.println("Enter salary"); salary=sin.nextDouble(); Employee e2=new Employee(); e2.accept(eid,ename,salary); e2.display(); if(e1.equals(e2)) System.out.println("Both …

Member Avatar for musthafa.aj
0
151
Member Avatar for Dearster

This works...try this import java.util.*; class ScannerDemo{ public static void main(String[] args) { System.out.println("please enter some thing"); Scanner s=new Scanner(System.in); while(s.hasNext()){ System.out.print(s.nextInt()+" "); }//end of while } }

Member Avatar for fardoonmuhafiz
0
84

The End.