Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners how to solve the nullPointer Exception in main
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Kanchan
how to solve the nullPointer Exception in main
1 Answer(s)      6 years and 8 months ago
Posted in : Java Beginners



Advertisement
View Answers

May 24, 2008 at 7:15 PM


Hi

import java.io.*;

public class actualState1 extends split {

private static String actualState1;

public String getActualState1(String actualState1){
return actualState1;
}
public void setActualState1(String actualState1){
this.actualState1 = actualState1;
}
public static void main(String args[]){
split s = new split ();
actualState1 ac=new actualState1();
//ac.setActualState1(s.spaceWord[1]);
//s.setActualState1(actualState1);
ac.setActualState1(ac.getActualState1(actualState1));
System.out.println(ac);
//System.out.println(ac.getActualState1(actualState1));
System.out.println("Welcome");
}
}

--------------------------

Read for more information.

http://www.roseindia.net/java/


Related Tutorials/Questions & Answers:
how to solve the nullPointer Exception in main - Java Beginners
how to solve the nullPointer Exception in main  New to Java ,pls help me how fix Null pointer Exception in main: two files , split .java another...: Exception in thread "main" java.lang.NullPointerException
Nullpointer Exception - JSP-Servlet
Nullpointer Exception  Hi friends, the given below is my output of the servlet program? how can i solve this exception ? HTTP Status 500... Exception report message description The server encountered
Advertisements
Hibernate nullpointer exception - Hibernate
Hibernate nullpointer exception  Hi, I am using eclipse IDE.I copied hibernate example from roseindia.net. I am using MYSQL as my database. 1.In eclipse I hava created new javaproject. 2.I hava copied Contact.java. and I
NullPointer Exception - JSP-Servlet
NullPointer Exception  It is in jsp - mysql database program. In this pro. it enters into the statement before try statement. It does not enter into the try statement. I found this by checking out.println("test"); statement
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...) { sqle.printStackTrace(); } finally { try {stmt.close();} catch (Exception e
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...) { sqle.printStackTrace(); } finally { try {stmt.close();} catch (Exception e
how to solve
how to solve   log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources). log4j:WARN Please initialize the log4j system properly
how to solve this..
how to solve this..  Given a list of students and their marks Name | Science | Math | English | Computer Ahmad | 28 | 100 | 66 | 34 Samad | 56 | 89 | 55
how to solve this..
how to solve this..  Given a list of students and their marks Name | Science | Math | English | Computer Ahmad | 28 | 100 | 66 | 34 Samad | 56 | 89 | 55
how to solve this problem for oracle connectivity
how to solve this problem for oracle connectivity  Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap ter could not establish the connection
how to solve an internet connection problem
how to solve an internet connection problem  when i run my application it give me this error: Exception in thread "AWT-EventQueue-0... how to implement
How to solve the Hibernate Common Exceptions?
How to solve the Hibernate Common Exceptions?  How to solve the Hibernate Common Exceptions
exception in thread main while running servlet
exception in thread main while running servlet  I got exception in thread main no such method error while running servlet. I have added servlet.api.jar file in classpath.my classpath is C:\Program Files\Apache Software Foundation
i dont no how to solve it pls
i dont no how to solve it pls   Calculate and display the sum of all prime number from 1 to 100 covert in java system codes
How to Solve the Syntax Error in java??
How to Solve the Syntax Error in java??  Syntax error in java? i have... of the program "objectname.i" What is the reason for this error??How to access the variable... j; private int k; public static void main(String args[]) { System.out.println
Solve it
Solve it  How to calculate the value which contains oparator and operand both using command line argument
how do i solve this problem?
how do i solve this problem?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access
how do i solve this question?
how do i solve this question?  1.Define a class named Circle with the following properties: a) An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier
how should i can solve
how should i can solve  Web based program - Input - Person's contact details with Passport Number as Unique Key. Save data in to oracle / MySQL. Output - List of Persons saved in the database. Technology to be used - JSP
Solve
ReadNumbersFromFile { public static void main(String[] args) { try...(Exception E
solve this
solve this   Create a student class. The student object should have studentid, studentname, subject and marks as properties. Also generate the getter and setter methods. Create 5 objects of this class and populate values
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 - Java Beginners
exception in thread main java.lang.unsupportedclassversionerror unsupported... getting the this error :exception in thread main...!"); } } for example: javac xxx.java-->comping java xxxx:error :exception in thread main
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: TESTING is not mapped [FROM TESTING]
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: TESTING... to execute a sample app to test this and understand how it works.package main...-factory> </hibernate-configuration> Exception: `15 [main] INFO
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 - Java Beginners
exception in thread main java.lang.unsupportedclassversionerror unsupported... is compling but runtime i am getting the exception in thread main.... Thanks  my code is class xxx { public static void main(String
Small Bug How to solve in my code
Small Bug How to solve in my code  String season=""; pst = con.prepareStatement("SELECT DISTINCT(Season) season FROM specialdates where Regid...") + ","; it shows bug in findbugs tool.. but it executes successfully how to solve
how to solve 'Stop Running This Script' Error ?
how to solve 'Stop Running This Script' Error ?  Hi.. When opened the page on IE browser(version : 8.0),it gives an java script error (i.e.Stop Running This Script). I have used jsp/servlet for this. Please help to resolved
How to solve button problem - Java Beginners
How to solve button problem  I have created button (Open File Dialog... equal space So button size also increasing. Could you please guide me how to solve this problem. Thank you Sir, Yours truly, T.Ramesh Puttaparthy
how to solve this kind of error in Eclipse IDE?
how to solve this kind of error in Eclipse IDE?   i'm creating the Simple CRUD Using Jsp, Servlet and MySQL program and i'm using the eclipse, and i all most done it, finally i'm going to run myself, it can't be run. i
How to Differenciate Main Thread and Child Thread in Java
How to Differenciate Main Thread and Child Thread in Java  hi... Main Thread and Java Child Thread. Please Suggest any example or online link... in Java Programming Language. These are Java Main Thread and the Child Thread
how to solve error like'java.lang.NumberFormatException: For input string: "7600113411"' this
how to solve error like'java.lang.NumberFormatException: For input string: "7600113411"' this  java.lang.NumberFormatException: For input string: "7600113411"    java.lang.NumberFormatException: For input string
How to eliminate error," Could not find the main class: filecopy.FileCopy. Program will exit." ?
How to eliminate error," Could not find the main class: filecopy.FileCopy....) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: filecopy.FileCopy. Program will exit. Exception in thread "main" Java
 

 

 

DMCA.com