Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
21
Posts with Downvotes
13
Downvoting Members
8
4 Commented Posts
0 Endorsements
~24.1K People Reached
Favorite Tags
Member Avatar for moaz.amin.37

hello friends i have a problem with javafx AnchorPane. I have an anchorpane that contains a button i want to set the height and width of anchorpane to zero but it no apply. how to do this .... actually i am working on a sliding panel

Member Avatar for rproffitt
0
357
Member Avatar for moaz.amin.37

hello!I install tomcat server and set CLASSPATH variable `servlet-api` and my servlets running properly but when i compile and run my old program program of `java 2 SE` then it compile successfully but not run it prints an error message G:\Java>javac BinarySearchDemo.java G:\Java>java BinarySearchDemo Error: Could not find or load …

Member Avatar for JamesCherrill
0
228
Member Avatar for moaz.amin.37

if a gui have 2 text fields and there are 10 buttons(0-9) to input numbers in text fields then how it will choose that which field get input. this i problem in my gui i write 2 methods but not working my code is below public void actionPerformed(ActionEvent e){ if(e.getSource()==b1){ …

Member Avatar for moaz.amin.37
0
307
Member Avatar for moaz.amin.37

i read adapter classes everything is write but i am confuse about Listener Interfaces and Adapter classes concept priblem is that when java create adapter classes it implements corresponding interface and privide defination with empty bodies of all methods that are present in interface this is declaration public class WindowAdapter …

Member Avatar for moaz.amin.37
0
491
Member Avatar for moaz.amin.37

i write a code in java of GUI calculator. i handle its addition event only but it is not working i don't know why its code is here import java.awt.*; import javax.swing.*; import java.awt.event.*; class Calculator extends JFrame implements ActionListener{ JTextField jtext; JPanel p; JLabel lab; JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b0,bPlus,bMinus,bMul,bPoint,bClear,bEqual; public Calculator(){ …

Member Avatar for JamesCherrill
0
2K
Member Avatar for moaz.amin.37

i have a problem in JDBC every thing is ok it shows this message `java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver` i already create DSN but but it stil show this error i do not know what i do My jdk is 64 bit and i create DSN of odbc 32 bit is any problem …

0
211
Member Avatar for moaz.amin.37

Hello to all first look this code class Square1 implements Runnable{ int a; public void run(){ a=10; } } class Square2 implements Runnable{ Square1 ob=new Square1(); public void run(){ System.out.println("Square Of this number is = "+(ob.a*ob.a)); } } class SquareThread{ public static void main(String args[]){ Thread t1=new Thread(new Square1()); Thread …

Member Avatar for moaz.amin.37
0
1K
Member Avatar for moaz.amin.37

i write a code that coun t the number of upper case letter in a string there is a problem my code count space as capital letter code is below #include<iostream> #include<conio.h> #include<cstring> #include<string.h> using namespace std; class Letters{ private: char str[20]; int num; public: Letters(){ str[0]='\0'; num=0; } void …

Member Avatar for Sarkurd
0
642
Member Avatar for moaz.amin.37

i write a program its output is below G:\Java\Multithreading>java NewThread Child Thread Thread[main,5,main] Main Thread 1 Child Thread 1 Main Thread 2 Main Thread 3 Main Thread 4 Main Thread 5 Main Thread Complete Child Thread 2 Child Thread 3 Child Thread 4 Child Thread 5 Child Thread Complete in …

Member Avatar for moaz.amin.37
0
288
Member Avatar for moaz.amin.37

hello i have a problem with Priority when I set priority of any thread then I get wrong output my code is below class Run implements Runnable{ private String st; public Run(String s){ st=s; } public void run(){ for(int i=1 ; i<=10 ; i++){ System.out.println(st+"="+i); } } } class PriorityCheck{ …

Member Avatar for moaz.amin.37
0
256
Member Avatar for moaz.amin.37

i write a code of multithreading in which arise an race condition code is below class Race1{ public void show(String s){ try{ System.out.print("["+s); Thread.sleep(1000); }catch(InterruptedException e){ e.printStackTrace(); } System.out.println("]"); } } class Checking implements Runnable{ Race1 ob=new Race1(); String s; public Checking(String s){ this.s=s; } public void run(){ synchronized(ob){ ob.show(s); …

Member Avatar for vantrendin
0
241
Member Avatar for moaz.amin.37

when we create a thread like this class Run implements Runnable{ public void run(){ //You code } } class Helloworld{ public static void main(String args[]){ Thread t1=new Thread(new Run()); Thread t2=new Thread(new Run()); } } in above code thread t1 and thread t2 is creating in `main()` method its mean …

Member Avatar for JamesCherrill
0
267
Member Avatar for moaz.amin.37

import java.io.*; class ConsoleInput{ public static void main(String ss[]) throws IOException{ InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); char c=' '; System.out.println("Enter Characters And q to Quiet"); do{ c=(char)br.read(); System.out.println(c); }while(c != 'q'); } } in upper code this line `c=(char)br.read();` get string from user at this point user enter some …

Member Avatar for JamesCherrill
0
261
Member Avatar for moaz.amin.37

Hello every body i have a problem with Scanner class.So my question is that when we use `BufferedReader` or`InputStreamReader` to reading and writing input and output then we use `close()`method to close the stream but in the case of `Scanner` why we do not close the stream this is my …

Member Avatar for JamesCherrill
0
156
Member Avatar for moaz.amin.37

hello i am doing my assignment on simple calculator in java.Now I want to handle exceptions in it. so i need some information about exception for exemple a user enter any expression like `(10+23+56-55)` it is corrent formate but when the user enter wrong formate like `(20++56//5)` i mean operator …

Member Avatar for BenWard
0
406
Member Avatar for moaz.amin.37

i want to place a button on upper left corner of JFrame with GridBagLayout.i write this code but it is notwork correctly gbc.gridx=0; gbc.gridx=0; add(b1,gbc); but the button place on center of JFrame why

Member Avatar for JamesCherrill
0
354
Member Avatar for moaz.amin.37

hello to all i have problem about button events the problem is that if i handle an event of button and show again a window(result of event) that also has buttons then how to handle events of buttons of second window please help me

Member Avatar for mKorbel
0
159
Member Avatar for moaz.amin.37

import java.io.*; class WriteFile { public static void main(String ss[]) { try { FileWriter fw=new FileWriter("output.txt"); PrintWriter pw=new PrintWriter(fw); String s1="Hello World"; String s2="I Am Learning Java"; pw.println(s1); pw.println(s2); pw.flush(); pw.close(); fw.close(); } catch(IOException e) { System.out.println(e); } } } in upper code println() is called with object of `PrintWriter` …

Member Avatar for moaz.amin.37
0
194
Member Avatar for moaz.amin.37

Exception message is not showing import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) throw new WrongException("age cannot be zero or nagetive"); System.out.print("age = …

Member Avatar for Akansha Jain
0
2K
Member Avatar for moaz.amin.37

if a program throw 2 exceptions can we handled it by user defined exception.for example import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) …

Member Avatar for JamesCherrill
0
250
Member Avatar for moaz.amin.37

Following exceptions are `Checked Exception` or `Unchecked Exception` ArrayStoreException IllegalArgumentException

Member Avatar for JamesCherrill
0
283
Member Avatar for moaz.amin.37

exception is a run time error,then why exceptions are again classified into compile time exception and run time exception,in that case it should be run time exceptions only.please give explanation with suitable real time example

Member Avatar for moaz.amin.37
-1
328
Member Avatar for moaz.amin.37

i am confuse about `paint()` method in applet .The confusion is that paint method is getting object as parameter of Graphics class like this `public void paint(Graphics g)` and i read that the Graphics class is an abstract class then how we create object of Graphics class and now you …

Member Avatar for JamesCherrill
0
373
Member Avatar for moaz.amin.37

first se these methods setForeground(Color.cyan); setBackground(Color.red); these methods are defined in Component class like this java.awt.Component and we pass parameters of an other class this is very confusable for me that we pass class members as parameters to method of a different class, i mean `setForeground(Color.cyan)` i defined in Component …

Member Avatar for stultuske
0
212
Member Avatar for moaz.amin.37

i am very confuse about java applets so please solve my questions my question is that when we write applet then we write only methods defination not method calling so i am confuse about this that who call the methods of applets.and second is that we call the methods of …

Member Avatar for JamesCherrill
0
252
Member Avatar for moaz.amin.37

hello every body. I need a book at java swing package.i am new in java programming and i want to learn GUI so plz help me. i want to download book of herbert schildt. book name swing a beginner guide Author Herbert Schildt

Member Avatar for stultuske
0
344
Member Avatar for moaz.amin.37

the virtual Methods concept is very difficult concept. In c++ when we want to implement polymorphism then we use virtual function. But in the case of java i read that all methods in java are virtual by default except final methods that can not be overridden. I am confuse about …

Member Avatar for jwenting
0
294
Member Avatar for moaz.amin.37

i can understand it when we want to implement polymorphism in c++ we use virtual functions and function overriding but when we want to implement polymorphism in java then we do not use virtual methods why. in java we use simply reference object that can store the address and use …

Member Avatar for Slavi
0
255
Member Avatar for moaz.amin.37

It is commanly said that java is architectural neutral what is the basic concept of this.I want brief answer on it and some examples of this.

Member Avatar for jwenting
0
426
Member Avatar for moaz.amin.37

hi i can't undestanding this why the main function in java is static and static function can call using class name. And why we declare main function as public. i can not understanding this procedure of main function in java. plz help me.

Member Avatar for stultuske
0
308