please tell me

please tell me

import java.lang.Thread; class Current{ public static void main(String ar[]){

Thread t = Thread.CurrentThread(); System.out.println("current thread"+t); System.out.println("thread name"+t.getName());

} } i got error as

Current.java:7: cannot find symbol symbol : method CurrentThread() location: class java.lang.Thread Thread t = Thread.CurrentThread(); ^ 1 error tell me the resolution please....

View Answers

November 25, 2011 at 12:21 PM

import java.lang.Thread;
class Current{
    public static void main(String ar[]){
    Thread t = Thread.currentThread();
    System.out.println("current thread"+t); 
    System.out.println("thread name"+t.getName());
   }
}









Related Tutorials/Questions & Answers:
please tell me
please tell me  i have created one table,when i close and again login, table name will be there, but its content not displayed, showing as no rows selected, please tell me the reason
please tell me
please tell me  why we are using http protocol in servlets
Advertisements
please tell me
, but its compiled and run successfully, please tell me the reason...please tell me  class Person{ int age; String name; void Person1(String g,int a){ name=g; age=a; } Person(String s,int i){ name=s; age=i; } void
please tell me
(); ^ 1 error tell me the resolution please....   import...please tell me  import java.lang.Thread; class Current{ public static void main(String ar[]){ Thread t = Thread.CurrentThread(); System.out.println
please tell me
: '}' expected ^ 2 errors, i got this error....... please tell me the resolution...please tell me  class Person{ string name; int age; void talk(){ System.out.println("my name is"+name); System.out.println
please tell me
please tell me  which cmd we use to clear the screen in sql prompt
please tell me
please tell me  why we use public static main(String ar){} in java instead of main
please tell me
please tell me  select * from emp order by 5 desc; in the above what is the meaning of 5, and what its functionality
please tell me
)); ^ 1 error please tell me the resolution of this   Hi...please tell me  import java.io.*; class SString{ public static void main(String ar[]) throws IOException{ BufferedReader br = new Bufferedreader
please tell me
(10.6,20.0); ^ 1 error, please tell me the resolution for this...   ...please tell me  class Sample{ private double num1,num2; void sample(double x,double y){ num1=x; num2=y; } void Sum(){ double result=num1+num2
please tell me
please tell me  what are the topics in core and advaced java....   Hi Friend, Please visit the following links: http://www.roseindia.net/ http://www.roseindia.net/java/ Thanks   Hi Friend, Please visit
please tell me
please tell me  Actually i am working on a Project tiitle is JavaMail System, 1)How to configure java mail API and a Demo Program for Sending mail and Receiving using JSP and Servlet
please tell me
; ^ please tell me the resolution   class Reserve...please tell me  class Reserve extends Thread{ int available=1; int wanted; Reserve(int i){ wanted = i; } public static void
please tell me
please tell me  class Producer extends Thread { StringBuffer sb; boolean dataprodover = false; Producer(){ sb = new StringBuffer(); } public void... got error as Inner class connot have static declarations pls tell me
please tell me
please tell me  class Person{ int age; String name; void talk(){ System.out.println("my name is:"+name); System.out.println("my age is:"+age); } } class Hash{ public static void main(String ar[]){ Person raju=new Person
please tell me
please tell me   <tr> <td><html:hidden property="tid" value="${user.id}"/></td> <td><bean:write name="user" property="emp_name"/>
please tell me
please tell me  Blockquote Blockquote> BlockquoteBlockquote how to get images from ms access databases to jsp pagesBlockquote   Jsp get image from ms access database Create a table named user(id,name,address,image
please tell me
please tell me  what is the source code if user give wrong user name password the explorer will show incorrect username password   <...); } %> For more information, please go through the following link: http
Software graduates please tell me,
Software graduates please tell me,  How to view image on Frame in swing(or)awt in Java
Software graduates please tell me,
Software graduates please tell me,  How to view image on Frame in swing(or)awt in Java
please tell me the flow of execution of this program
please tell me the flow of execution of this program  class Test{ int x; Test(int x){ this.x=x; } static void access(){ System.out.println("x= "+x); }} class Static{ public static void main(String ar[]){ Test obj=new Test(55
Please tell me the code to generate the below structure
Please tell me the code to generate the below structure  1 2 3 4 5 6 7 8 9 1 2 3 4 6 7 8 9 1 2 3 7 8 9 1 2 8 9 1 9 1 2 8 9 1 2 3 7 8 9 1 2 3 4 6 7 8 9 1 2 3
Please tell me how can i convert string to timer
Please tell me how can i convert string to timer  Please tell me how can i convert string to timer
please tell me what is ment by wrapper class in java........
please tell me what is ment by wrapper class in java........  what is ment by wrapper class in java
i have problem with this query... please tell me the resolution if this .........
i have problem with this query... please tell me the resolution if this .........  select length(ename)||' charecters exist in '||initcap(ename)||'s name' as "names and length" from emp
i have problem with this query... please tell me the resolution if this .........
i have problem with this query... please tell me the resolution if this .........  select initcap(ename),job from emp where substr(job,4,length(job,4,3)))='age
please tell me about command line arguments in java?
please tell me about command line arguments in java?  please tell me about command line arguments in java?   Hi Friend, The command-line arguments are the arguments which are sent to the program being called. You can
Please tell me where I can find tutorials on spring hibernate?
Please tell me where I can find tutorials on spring hibernate?  Hello, Please tell me where I can find tutorials on spring hibernate? Thanks..   Dear Friend, You can find some good tutorials on Spring Hibernate here
please tell me about command line arguments in java?
please tell me about command line arguments in java?  please tell me about command line arguments in java?   Hi Friend, The command-line arguments are the arguments which are sent to the program being called. You can
please tell me the difference between local variable, staitic variables, and instance variables....
please tell me the difference between local variable, staitic variables, and instance variables....  please tell me the difference between local variable, staitic variables, and instance variables
Please tell me how I can access a field (data type char) of resultset in a java class
Please tell me how I can access a field (data type char) of resultset in a java class  I have created a table named empdetails in postgreSql 8.4...("empsex")); as erroneous. There is no method like getChar() also. Please tell me
Tell me - Java Beginners
Tell me   how to create a valid.js file please tell me and give the write code Thanks  Hi friend, Please give details for requirement of this "valid.js" file. For read more information http
Tell me - Struts
Directory Structure for Struts  Tell me the Directory Structure for Struts
Pls anyboby tell me...
Pls anyboby tell me...  which book easy to learn spring
Tell me - Struts
Struts tutorial to learn from beginning   Tell me, how can i learn the struts from beginning
Tell me - Struts
Directory Structure with example program Execution  Tell me the Directory Structure with example program Execution
tell me coding for this
tell me coding for this  Write an application that displays the integer equivalents of the following character...A   Java get Integer value of Character class GetIntValueOfCharacter { public static void main
plz tell me
plz tell me  how to get no. of times the 'button' is pressed   Here is a java swing code that counts the number of times the button clicked... CountButtonClicks(); } JButton button1 = new JButton("Click Me!"); int clickCount
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
please guide me - EJB
please guide me  Hi I am Pradeep singh ,done SCJP 5.0 and SCWCD 5.0 .Now i want to learn further .So please tell me whether should i learn EJB 3.0... advice me .At present i am jobless
please tell the reason for java.lang.ArrayIndexOutOfBoundsException: in program
please tell the reason for java.lang.ArrayIndexOutOfBoundsException: in program  public class Test { public static void show(int x[][],int y[][]){ int rows = x.length; int columns = y.length
please help me.
please help me.  Please send me a code of template in opencms and its procedure.so i can implement the code. Thanks trinath
please help me.
please help me.  How to read a properties file in java with a suitable example. Please send me. Thanks Trinath   Please visit the following link: Java read properties file
please help me.
please help me.  Please send me the validation of this below link. the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html Thanks Trinath
please help me.
please help me.  How to move the edits.jsp in below link? http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
help me please
help me please   Hello I want helping for this question , Please Write a program that reads some friendsââ?¬â?¢ names, stores them in an array, and then prints out on the screen all friends who start by a particular letter
please help me.
please help me.  I have a jsp page under that i add a list box under i get the countries through my database. so how can i do
Please give me the answer.
"int a=08 or 09" its giving compile time error why   "int a=08 or 09" its giving compile time error why ? can any one give me the answer of this please
please help me to this problem..
please help me to this problem..  i wrote a program like keyboard... inside the JTextField) but i want to make this program to let me write where i clicked (i.e allows me to write any thing at the field where i clicked
please help me.
please help me.  I have three table in mysql,and i hava create a excel sheet and add this sheet.but my question is in every sheet i can display one one table result.how can i do

Ads